Methods |
public
|
__construct(string $name)
Creates a property builder.
Creates a property builder.
Parameters
$name |
Name of the property
|
|
#
|
public
|
makePublic(): $this
Makes the property public.
Makes the property public.
Returns
The builder instance (for fluid interface)
|
#
|
public
|
makeProtected(): $this
Makes the property protected.
Makes the property protected.
Returns
The builder instance (for fluid interface)
|
#
|
public
|
makePrivate(): $this
Makes the property private.
Makes the property private.
Returns
The builder instance (for fluid interface)
|
#
|
public
|
makeStatic(): $this
Makes the property static.
Makes the property static.
Returns
The builder instance (for fluid interface)
|
#
|
public
|
makeReadonly(): $this
Makes the property readonly.
Makes the property readonly.
Returns
The builder instance (for fluid interface)
|
#
|
public
|
setDefault(mixed $value): $this
Sets default value for the property.
Sets default value for the property.
Parameters
$value |
Default value to use
|
Returns
The builder instance (for fluid interface)
|
#
|
public
|
setDocComment(Doc|string $docComment): $this
Sets doc comment for the property.
Sets doc comment for the property.
Parameters
$docComment |
Doc comment to set
|
Returns
The builder instance (for fluid interface)
|
#
|
public
|
setType(string|Name|Identifier|ComplexType $type): $this
Sets the property type for PHP 7.4+.
Sets the property type for PHP 7.4+.
|
#
|
public
|
addAttribute(Attribute|AttributeGroup $attribute): $this
Adds an attribute group.
Returns
The builder instance (for fluid interface)
|
#
|
public
|
getNode(): Property
Returns the built class node.
Returns the built class node.
Returns
Implements
|
#
|