Copied!
CloneableInstantiable
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 makePrivate()
 

Makes the (promoted) parameter private.

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

Makes the (promoted) parameter protected.

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

Makes the (promoted) parameter public.

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

Makes the (promoted) parameter readonly.

  • 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)
Properties
protected array $attributeGroups = []
 
  • var list<\Node\AttributeGroup>
protected bool $byRef = false
protected ?PhpParser\Node\Expr $default = NULL
protected int $flags = 0
protected string $name
protected ?PhpParser\Node $type = NULL
 
  • var \Node\Identifier|\Node\Name|\Node\ComplexType|null
protected bool $variadic = false
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration