PHP Class PhpParser\Builder\Param

Inheritance: extends PhpParser\BuilderAbstract
Mostra file Open project: nikic/PHP-Parser

Protected Properties

Property Type Description
$byRef
$default
$name
$type string | PhpParser\Node\Name | PhpParser\Node\NullableType | null

Public Methods

Method Description
__construct ( string $name ) Creates a parameter builder.
getNode ( ) : Param Returns the built parameter node.
makeByRef ( ) Make the parameter accept the value by reference.
setDefault ( mixed $value ) Sets default value for the parameter.
setTypeHint ( string | Name | NullableType $type ) Sets type hint for the parameter.

Method Details

__construct() public method

Creates a parameter builder.
public __construct ( string $name )
$name string Name of the parameter

getNode() public method

Returns the built parameter node.
public getNode ( ) : Param
return PhpParser\Node\Param The built parameter node

makeByRef() public method

Make the parameter accept the value by reference.
public makeByRef ( )

setDefault() public method

Sets default value for the parameter.
public setDefault ( mixed $value )
$value mixed Default value to use

setTypeHint() public method

Sets type hint for the parameter.
public setTypeHint ( string | Name | NullableType $type )
$type string | PhpParser\Node\Name | PhpParser\Node\NullableType Type hint to use

Property Details

$byRef protected_oe property

protected $byRef

$default protected_oe property

protected $default

$name protected_oe property

protected $name

$type protected_oe property

protected string|Name,PhpParser\Node|NullableType,PhpParser\Node|null $type
return string | PhpParser\Node\Name | PhpParser\Node\NullableType | null