PHP Class PhpParser\Builder\Property

Inheritance: extends PhpParser\BuilderAbstract
显示文件 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_oe property

protected $attributes

$default protected_oe property

protected $default

$flags protected_oe property

protected $flags

$name protected_oe property

protected $name