PHP Интерфейс PDepend\Source\AST\ASTNode

С версии: 2.3
Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
configureLinesAndColumns ( integer $startLine, integer $endLine, integer $startColumn, integer $endColumn ) : void For better performance we have moved the single setter methods for the node columns and lines into this configure method.
findChildrenOfType ( string $targetType, array &$results = [] ) : PDepend\Source\AST\ASTNode[] This method will search recursive for all child nodes that are an instance of the given $targetType. The returned value will be an empty array if no child exists for that.
getChild ( integer $index ) : PDepend\Source\AST\ASTNode Returns the node instance for the given index or throws an exception.
getChildren ( ) : PDepend\Source\AST\ASTNode[] This method returns all direct children of the actual node.
getComment ( ) : string Returns a doc comment for this node or null when no comment was found.
getEndColumn ( ) : integer Returns the end column for this ast node.
getEndLine ( ) : integer Returns the end line for this ast node.
getFirstChildOfType ( string $targetType ) : PDepend\Source\AST\ASTNode This method will search recursive for the first child node that is an instance of the given $targetType. The returned value will be null if no child exists for that.
getImage ( ) : string Returns the source image of this ast node.
getParent ( ) : PDepend\Source\AST\ASTNode Returns the parent node of this node or null when this node is the root of a node tree.
getParentsOfType ( string $parentType ) : PDepend\Source\AST\ASTNode[] Traverses up the node tree and finds all parent nodes that are instances of $parentType.
getStartColumn ( ) : integer Returns the start column for this ast node.
getStartLine ( ) : integer Returns the start line for this ast node.
setComment ( string $comment ) : void Sets the raw doc comment for this node.
setParent ( PDepend\Source\AST\ASTNode $node ) : void Sets the parent node of this node.

Описание методов

configureLinesAndColumns() публичный Метод

For better performance we have moved the single setter methods for the node columns and lines into this configure method.
С версии: 0.9.10
public configureLinesAndColumns ( integer $startLine, integer $endLine, integer $startColumn, integer $endColumn ) : void
$startLine integer
$endLine integer
$startColumn integer
$endColumn integer
Результат void

findChildrenOfType() публичный Метод

This method will search recursive for all child nodes that are an instance of the given $targetType. The returned value will be an empty array if no child exists for that.
public findChildrenOfType ( string $targetType, array &$results = [] ) : PDepend\Source\AST\ASTNode[]
$targetType string Searched class or interface type.
$results array
Результат PDepend\Source\AST\ASTNode[]

getChild() публичный Метод

Returns the node instance for the given index or throws an exception.
public getChild ( integer $index ) : PDepend\Source\AST\ASTNode
$index integer
Результат PDepend\Source\AST\ASTNode

getChildren() публичный Метод

This method returns all direct children of the actual node.
public getChildren ( ) : PDepend\Source\AST\ASTNode[]
Результат PDepend\Source\AST\ASTNode[]

getComment() публичный Метод

Returns a doc comment for this node or null when no comment was found.
public getComment ( ) : string
Результат string

getEndColumn() публичный Метод

Returns the end column for this ast node.
public getEndColumn ( ) : integer
Результат integer

getEndLine() публичный Метод

Returns the end line for this ast node.
public getEndLine ( ) : integer
Результат integer

getFirstChildOfType() публичный Метод

This method will search recursive for the first child node that is an instance of the given $targetType. The returned value will be null if no child exists for that.
public getFirstChildOfType ( string $targetType ) : PDepend\Source\AST\ASTNode
$targetType string
Результат PDepend\Source\AST\ASTNode

getImage() публичный Метод

Returns the source image of this ast node.
public getImage ( ) : string
Результат string

getParent() публичный Метод

Returns the parent node of this node or null when this node is the root of a node tree.
public getParent ( ) : PDepend\Source\AST\ASTNode
Результат PDepend\Source\AST\ASTNode

getParentsOfType() публичный Метод

Traverses up the node tree and finds all parent nodes that are instances of $parentType.
public getParentsOfType ( string $parentType ) : PDepend\Source\AST\ASTNode[]
$parentType string
Результат PDepend\Source\AST\ASTNode[]

getStartColumn() публичный Метод

Returns the start column for this ast node.
public getStartColumn ( ) : integer
Результат integer

getStartLine() публичный Метод

Returns the start line for this ast node.
public getStartLine ( ) : integer
Результат integer

setComment() публичный Метод

Sets the raw doc comment for this node.
public setComment ( string $comment ) : void
$comment string The doc comment block for this node.
Результат void

setParent() публичный Метод

Sets the parent node of this node.
public setParent ( PDepend\Source\AST\ASTNode $node ) : void
$node PDepend\Source\AST\ASTNode
Результат void