PHP Class PhpParser\Builder\Property

Inheritance: extends PhpParser\BuilderAbstract
Show file Open project: nikic/php-parser Class Usage Examples

Protected Properties

Property Type Description
$attributes
$default
$flags
$name

Public Methods

Method Description
__construct ( string $name ) Creates a property builder.
getNode ( ) : Property Returns the built class node.
makePrivate ( ) Makes the property private.
makeProtected ( ) Makes the property protected.
makePublic ( ) Makes the property public.
makeStatic ( ) Makes the property static.
setDefault ( mixed $value ) Sets default value for the property.
setDocComment ( PhpParser\Comment\Doc | string $docComment ) Sets doc comment for the property.

Method Details

__construct() public method

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

getNode() public method

Returns the built class node.
public getNode ( ) : Property
return PhpParser\Node\Stmt\Property The built property node

makePrivate() public method

Makes the property private.
public makePrivate ( )

makeProtected() public method

Makes the property protected.
public makeProtected ( )

makePublic() public method

Makes the property public.
public makePublic ( )

makeStatic() public method

Makes the property static.
public makeStatic ( )

setDefault() public method

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

setDocComment() public method

Sets doc comment for the property.
public setDocComment ( PhpParser\Comment\Doc | string $docComment )
$docComment PhpParser\Comment\Doc | string Doc comment to set

Property Details

$attributes protected property

protected $attributes

$default protected property

protected $default

$flags protected property

protected $flags

$name protected property

protected $name