PHP Class PhpParser\NodeAbstract

Inheritance: implements phpparser\Node, implements JsonSerializable
Afficher le fichier Open project: nikic/php-parser Class Usage Examples

Protected Properties

Свойство Type Description
$attributes

Méthodes publiques

Méthode Description
__construct ( array $attributes = [] ) Creates a Node.
getAttribute ( $key, $default = null )
getAttributes ( )
getDocComment ( ) : null | Comment\Doc Gets the doc comment of the node.
getLine ( ) : integer Gets line the node started in.
getType ( ) : string Gets the type of the node.
hasAttribute ( $key )
jsonSerialize ( )
setAttribute ( $key, $value )
setDocComment ( Comment\Doc $docComment ) Sets the doc comment of the node.
setLine ( integer $line ) Sets line the node started in.

Method Details

__construct() public méthode

Creates a Node.
public __construct ( array $attributes = [] )
$attributes array Array of attributes

getAttribute() public méthode

public getAttribute ( $key, $default = null )

getAttributes() public méthode

public getAttributes ( )

getDocComment() public méthode

The doc comment has to be the last comment associated with the node.
public getDocComment ( ) : null | Comment\Doc
Résultat null | Comment\Doc Doc comment object or null

getLine() public méthode

Gets line the node started in.
public getLine ( ) : integer
Résultat integer Line

getType() public méthode

Gets the type of the node.
public getType ( ) : string
Résultat string Type of the node

hasAttribute() public méthode

public hasAttribute ( $key )

jsonSerialize() public méthode

public jsonSerialize ( )

setAttribute() public méthode

public setAttribute ( $key, $value )

setDocComment() public méthode

This will either replace an existing doc comment or add it to the comments array.
public setDocComment ( Comment\Doc $docComment )
$docComment Comment\Doc Doc comment to set

setLine() public méthode

Sets line the node started in.
public setLine ( integer $line )
$line integer Line

Property Details

$attributes protected_oe property

protected $attributes