PHP 인터페이스 PDepend\Source\AST\ASTNode

부터: 2.3
파일 보기 프로젝트 열기: pdepend/pdepend 0 사용 예제들

공개 메소드들

메소드 설명
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