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
|
makeAbstract(): $this
Makes the property abstract. Requires at least one property hook to be specified as well.
Makes the property abstract. Requires at least one property hook to be specified as well.
Returns
The builder instance (for fluid interface)
|
#
|
public
|
makeFinal(): $this
Makes the property final.
Makes the property final.
Returns
The builder instance (for fluid interface)
|
#
|
public
|
makePrivateSet(): $this
Gives the property private(set) visibility.
Gives the property private(set) visibility.
Returns
The builder instance (for fluid interface)
|
#
|
public
|
makeProtectedSet(): $this
Gives the property protected(set) visibility.
Gives the property protected(set) visibility.
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
|
addHook(PropertyHook $hook): $this
Adds a property hook.
Returns
The builder instance (for fluid interface)
|
#
|
public
|
getNode(): Property
Returns the built class node.
Returns the built class node.
Returns
Implements
|
#
|