Copied!
Cloneable Instantiable
Methods
public __construct ( string $name )
 

Creates a property builder.

  • param string $name Name of the property
public addAttribute ( $attribute )
 

Adds an attribute group.

  • param Node\Attribute | Node\AttributeGroup $attribute
  • return $this The builder instance (for fluid interface)
public getNode () : PhpParser\Node
 

Returns the built class node.

  • return Stmt\Property The built property node
public makePrivate ()
 

Makes the property private.

  • return $this The builder instance (for fluid interface)
public makeProtected ()
 

Makes the property protected.

  • return $this The builder instance (for fluid interface)
public makePublic ()
 

Makes the property public.

  • return $this The builder instance (for fluid interface)
public makeReadonly ()
 

Makes the property readonly.

  • return $this The builder instance (for fluid interface)
public makeStatic ()
 

Makes the property static.

  • return $this The builder instance (for fluid interface)
public setDefault ( $value )
 

Sets default value for the property.

  • param mixed $value Default value to use
  • return $this The builder instance (for fluid interface)
public setDocComment ( $docComment )
 

Sets doc comment for the property.

  • param PhpParser\Comment\Doc | string $docComment Doc comment to set
  • return $this The builder instance (for fluid interface)
public setType ( $type )
 

Sets the property type for PHP 7.4+.

  • param string | Name | Identifier | ComplexType $type
  • return $this
Properties
protected $attributeGroups
 
  • var Node\AttributeGroup []
protected $attributes
protected $default
protected $flags
protected $name
protected $type
 
  • var null | Identifier | Name | NullableType
© 2022 Bruce Wells
Search Namespaces \ Classes
Configuration