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

Creates a parameter builder.

  • param string $name Name of the parameter
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 parameter node.

  • return Node\Param The built parameter node
public makeByRef ()
 

Make the parameter accept the value by reference.

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

Make the parameter variadic

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

Sets default value for the parameter.

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

Sets type for the parameter.

  • param string | Node\Name | Node\Identifier | Node\ComplexType $type Parameter type
  • return $this The builder instance (for fluid interface)
public setTypeHint ( $type )
 

Sets type for the parameter.

  • param string | Node\Name | Node\Identifier | Node\ComplexType $type Parameter type
  • return $this The builder instance (for fluid interface)
  • deprecated Use setType() instead
Properties
protected $attributeGroups
 
  • var Node\AttributeGroup []
protected $byRef
protected $default
protected $name
protected $type
 
  • var Node\Identifier | Node\Name | Node\NullableType | null
protected $variadic
© 2022 Bruce Wells
Search Namespaces \ Classes
Configuration