PHP Класс PDepend\Source\Language\PHP\PHPBuilder

Наследование: implements PDepend\Source\Builder\Builder
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$cache PDepend\Util\Cache\CacheDriver The internal used cache instance.
$context PDepend\Source\Builder\BuilderContext The ast builder context.
$defaultCompilationUnit PDepend\Source\AST\ASTCompilationUnit Default source file that acts as a dummy.
$defaultPackage PDepend\Source\AST\ASTNamespace Default package which contains all functions and classes with an unknown scope.

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

Метод Описание
__construct ( ) Constructs a new builder instance.
buildAnonymousClass ( ) : ASTAnonymousClass Builds an anonymous class instance.
buildAstAllocationExpression ( string $image ) : PDepend\Source\AST\ASTAllocationExpression Builds a new allocation expression node.
buildAstArguments ( ) : PDepend\Source\AST\ASTArguments Builds a new arguments list.
buildAstArray ( ) : PDepend\Source\AST\ASTArray Builds a new php array node.
buildAstArrayElement ( ) : PDepend\Source\AST\ASTArrayElement Builds a new array element node.
buildAstArrayIndexExpression ( ) : PDepend\Source\AST\ASTArrayIndexExpression Builds a new array-expression node.
buildAstAssignmentExpression ( string $image ) : PDepend\Source\AST\ASTAssignmentExpression Builds a new assignment expression node.
buildAstBooleanAndExpression ( ) : PDepend\Source\AST\ASTBooleanAndExpression Builds a new boolean and-expression.
buildAstBooleanOrExpression ( ) : PDepend\Source\AST\ASTBooleanOrExpression Builds a new boolean or-expression.
buildAstBreakStatement ( string $image ) : PDepend\Source\AST\ASTBreakStatement Builds a new break-statement node instance.
buildAstCastExpression ( string $image ) : PDepend\Source\AST\ASTCastExpression Builds a new cast-expression node instance.
buildAstCatchStatement ( string $image ) : PDepend\Source\AST\ASTCatchStatement Builds a new catch-statement node.
buildAstClassFqnPostfix ( ) : PDepend\Source\AST\ASTClassFqnPostfix Builds a new full qualified class name postfix expression.
buildAstClassOrInterfaceReference ( string $qualifiedName ) : PDepend\Source\AST\ASTClassOrInterfaceReference Builds a new code type reference instance.
buildAstClassReference ( string $qualifiedName ) : PDepend\Source\AST\ASTClassReference Builds a new code type reference instance.
buildAstCloneExpression ( string $image ) : PDepend\Source\AST\ASTCloneExpression Builds a new clone-expression node.
buildAstClosure ( ) : PDepend\Source\AST\ASTClosure Builds a new closure node.
buildAstComment ( string $cdata ) : PDepend\Source\AST\ASTComment Builds a new comment node instance.
buildAstCompoundExpression ( ) : PDepend\Source\AST\ASTCompoundExpression Builds a new compound expression node.
buildAstCompoundVariable ( string $image ) : PDepend\Source\AST\ASTCompoundVariable Builds a new compound variable node.
buildAstConditionalExpression ( ) : PDepend\Source\AST\ASTConditionalExpression Builds a new boolean conditional-expression.
buildAstConstant ( string $image ) : PDepend\Source\AST\ASTConstant Builds a new constant node.
buildAstConstantDeclarator ( string $image ) : PDepend\Source\AST\ASTConstantDeclarator Builds a new constant declarator node.
buildAstConstantDefinition ( string $image ) : PDepend\Source\AST\ASTConstantDefinition Builds a new constant definition node.
buildAstConstantPostfix ( string $image ) : PDepend\Source\AST\ASTConstantPostfix Builds a new constant postfix expression.
buildAstContinueStatement ( string $image ) : PDepend\Source\AST\ASTContinueStatement Builds a new continue-statement node instance.
buildAstDeclareStatement ( ) : PDepend\Source\AST\ASTDeclareStatement Builds a new declare-statement node.
buildAstDoWhileStatement ( string $image ) : PDepend\Source\AST\ASTDoWhileStatement Builds a new do/while-statement node.
buildAstEchoStatement ( string $image ) : PDepend\Source\AST\ASTEchoStatement Builds a new exit-statement instance.
buildAstElseIfStatement ( string $image ) : PDepend\Source\AST\ASTElseIfStatement Builds a new elseif statement node.
buildAstEvalExpression ( string $image ) : PDepend\Source\AST\ASTEvalExpression Builds a new eval-expression node.
buildAstExitExpression ( string $image ) : PDepend\Source\AST\ASTExitExpression Builds a new exit-expression instance.
buildAstExpression ( string $image = null ) : PDepend\Source\AST\ASTExpression Builds a new expression node.
buildAstFieldDeclaration ( ) : PDepend\Source\AST\ASTFieldDeclaration Builds a new field declaration node.
buildAstFinallyStatement ( ) : PDepend\Source\AST\ASTFinallyStatement Builds a new finally-statement node.
buildAstForInit ( ) : PDepend\Source\AST\ASTForInit Builds a new for-init node.
buildAstForStatement ( string $image ) : PDepend\Source\AST\ASTForStatement Builds a new for statement node.
buildAstForUpdate ( ) : PDepend\Source\AST\ASTForUpdate Builds a new for-update node.
buildAstForeachStatement ( string $image ) : PDepend\Source\AST\ASTForeachStatement Builds a new foreach-statement node.
buildAstFormalParameter ( ) : PDepend\Source\AST\ASTFormalParameter Builds a new formal parameter node.
buildAstFormalParameters ( ) : PDepend\Source\AST\ASTFormalParameters Builds a new formal parameters node.
buildAstFunctionPostfix ( string $image ) : PDepend\Source\AST\ASTFunctionPostfix Builds a new function postfix expression.
buildAstGlobalStatement ( ) : PDepend\Source\AST\ASTGlobalStatement Builds a new global-statement instance.
buildAstGotoStatement ( string $image ) : PDepend\Source\AST\ASTGotoStatement Builds a new goto-statement instance.
buildAstHeredoc ( ) : PDepend\Source\AST\ASTHeredoc Builds a new heredoc node.
buildAstIdentifier ( string $image ) : PDepend\Source\AST\ASTIdentifier Builds a new identifier node.
buildAstIfStatement ( string $image ) : PDepend\Source\AST\ASTIfStatement Builds a new if statement node.
buildAstIncludeExpression ( ) : PDepend\Source\AST\ASTIncludeExpression Builds a new include- or include_once-expression.
buildAstInstanceOfExpression ( string $image ) : PDepend\Source\AST\ASTInstanceOfExpression Builds a new instanceof expression node.
buildAstIssetExpression ( ) : PDepend\Source\AST\ASTIssetExpression Builds a new isset-expression node.
buildAstLabelStatement ( string $image ) : PDepend\Source\AST\ASTLabelStatement Builds a new label-statement instance.
buildAstListExpression ( string $image ) : PDepend\Source\AST\ASTListExpression Builds a new list-expression node.
buildAstLiteral ( string $image ) : PDepend\Source\AST\ASTLiteral Builds a new literal node.
buildAstLogicalAndExpression ( ) : PDepend\Source\AST\ASTLogicalAndExpression Builds a new logical and-expression.
buildAstLogicalOrExpression ( ) : PDepend\Source\AST\ASTLogicalOrExpression Builds a new logical or-expression.
buildAstLogicalXorExpression ( ) : PDepend\Source\AST\ASTLogicalXorExpression Builds a new logical xor-expression.
buildAstMemberPrimaryPrefix ( string $image ) : PDepend\Source\AST\ASTMemberPrimaryPrefix Builds a new member primary expression node.
buildAstMethodPostfix ( string $image ) : PDepend\Source\AST\ASTMethodPostfix Builds a new method postfix expression.
buildAstParentReference ( PDepend\Source\AST\ASTClassOrInterfaceReference $reference ) : PDepend\Source\AST\ASTParentReference Builds a new parent reference instance.
buildAstPostfixExpression ( string $image ) : PDepend\Source\AST\ASTPostfixExpression Builds a new postfix-expression node instance.
buildAstPreDecrementExpression ( ) : PDepend\Source\AST\ASTPreDecrementExpression Builds a new pre-decrement-expression node instance.
buildAstPreIncrementExpression ( ) : PDepend\Source\AST\ASTPreIncrementExpression Builds a new pre-increment-expression node instance.
buildAstPrintExpression ( ) : PDepend\Source\AST\ASTConditionalExpression Builds a new print-expression.
buildAstPropertyPostfix ( string $image ) : PDepend\Source\AST\ASTPropertyPostfix Builds a new property postfix expression.
buildAstRequireExpression ( ) : PDepend\Source\AST\ASTRequireExpression Builds a new require- or require_once-expression.
buildAstReturnStatement ( string $image ) : PDepend\Source\AST\ASTReturnStatement Builds a new return statement node instance.
buildAstScalarType ( string $image ) : PDepend\Source\AST\ASTScalarType Builds a new primitive type node.
buildAstScope ( ) : PDepend\Source\AST\ASTScope Builds a new function/method scope instance.
buildAstScopeStatement ( ) : PDepend\Source\AST\ASTScopeStatement Builds a new scope-statement instance.
buildAstSelfReference ( PDepend\Source\AST\AbstractASTClassOrInterface $type ) : PDepend\Source\AST\ASTSelfReference Builds a new self reference instance.
buildAstShiftLeftExpression ( ) : PDepend\Source\AST\ASTShiftLeftExpression Build a new shift left expression.
buildAstShiftRightExpression ( ) : PDepend\Source\AST\ASTShiftRightExpression Build a new shift right expression.
buildAstStatement ( ) : PDepend\Source\AST\ASTStatement Builds a new statement instance.
buildAstStaticReference ( PDepend\Source\AST\AbstractASTClassOrInterface $owner ) : PDepend\Source\AST\ASTStaticReference Builds a new static reference instance.
buildAstStaticVariableDeclaration ( string $image ) : PDepend\Source\AST\ASTStaticVariableDeclaration Builds a new static variable declaration node.
buildAstString ( ) : PDepend\Source\AST\ASTString Builds a new php string node.
buildAstStringIndexExpression ( ) : PDepend\Source\AST\ASTStringIndexExpression Builds a new string-expression node.
buildAstSwitchLabel ( string $image ) : PDepend\Source\AST\ASTSwitchLabel Builds a new switch-label node.
buildAstSwitchStatement ( ) : PDepend\Source\AST\ASTSwitchStatement Builds a new switch-statement-node.
buildAstThrowStatement ( string $image ) : PDepend\Source\AST\ASTThrowStatement Builds a new throw-statement instance.
buildAstTraitAdaptation ( ) : PDepend\Source\AST\ASTTraitAdaptation Builds a new trait adaptation scope
buildAstTraitAdaptationAlias ( string $image ) : PDepend\Source\AST\ASTTraitAdaptationAlias Builds a new trait adaptation alias statement.
buildAstTraitAdaptationPrecedence ( string $image ) : PDepend\Source\AST\ASTTraitAdaptationPrecedence Builds a new trait adaptation precedence statement.
buildAstTraitReference ( string $qualifiedName ) : PDepend\Source\AST\ASTTraitReference Builds a new trait reference node.
buildAstTraitUseStatement ( ) : PDepend\Source\AST\ASTTraitUseStatement Builds a new trait use-statement node.
buildAstTryStatement ( string $image ) : PDepend\Source\AST\ASTTryStatement Builds a new try-statement instance.
buildAstTypeArray ( ) : PDepend\Source\AST\ASTTypeArray Builds a new array type node.
buildAstTypeCallable ( ) : PDepend\Source\AST\ASTTypeCallable Builds a new node for the callable type.
buildAstUnaryExpression ( string $image ) : PDepend\Source\AST\ASTUnaryExpression Builds a new unary expression node instance.
buildAstUnsetStatement ( ) : PDepend\Source\AST\ASTUnsetStatement Builds a new unset-statement instance.
buildAstVariable ( string $image ) : PDepend\Source\AST\ASTVariable Builds a new variable node.
buildAstVariableDeclarator ( string $image ) : PDepend\Source\AST\ASTVariableDeclarator Builds a new variable declarator node.
buildAstVariableVariable ( string $image ) : PDepend\Source\AST\ASTVariableVariable Builds a new variable variable node.
buildAstWhileStatement ( string $image ) : PDepend\Source\AST\ASTWhileStatement Builds a new while-statement node.
buildAstYieldStatement ( string $image ) : PDepend\Source\AST\ASTYieldStatement Builds a new yield-statement instance.
buildClass ( string $name ) : PDepend\Source\AST\ASTClass Builds a new class instance or reuses a previous created class.
buildFunction ( string $name ) : PDepend\Source\AST\ASTFunction Builds a new function instance.
buildInterface ( string $name ) : PDepend\Source\AST\ASTInterface Builds a new new interface instance.
buildMethod ( string $name ) : PDepend\Source\AST\ASTMethod Builds a new method instance.
buildNamespace ( string $name ) : PDepend\Source\AST\ASTNamespace Builds a new package instance.
buildTrait ( string $qualifiedName ) : PDepend\Source\AST\ASTTrait Builds a new php trait instance.
getClass ( string $qualifiedName ) : PDepend\Source\AST\ASTClass This method will try to find an already existing instance for the given qualified name. It will create a new {@link \PDepend\Source\AST\ASTClass} instance when no matching type exists.
getClassOrInterface ( string $qualifiedName ) : PDepend\Source\AST\AbstractASTClassOrInterface This method will try to find an already existing instance for the given qualified name. It will create a new {@link \PDepend\Source\AST\ASTClass} instance when no matching type exists.
getInterface ( string $qualifiedName ) : PDepend\Source\AST\ASTInterface This method will try to find an already existing instance for the given qualified name. It will create a new {@link \PDepend\Source\AST\ASTInterface} instance when no matching type exists.
getIterator ( ) : PDepend\Source\AST\ASTArtifactList Returns an iterator with all generated {@link \PDepend\Source\AST\ASTNamespace} objects.
getNamespaces ( ) : PDepend\Source\AST\ASTNamespace[] Returns an iterator with all generated {@link \PDepend\Source\AST\ASTNamespace} objects.
getTrait ( string $qualifiedName ) : PDepend\Source\AST\ASTTrait This method will try to find an already existing instance for the given qualified name. It will create a new {@link \PDepend\Source\AST\ASTTrait} instance when no matching type exists.
restoreClass ( PDepend\Source\AST\ASTClass $class ) : void Restores a class within the internal type scope.
restoreFunction ( PDepend\Source\AST\ASTFunction $function ) : void Restores a function within the internal type scope.
restoreInterface ( PDepend\Source\AST\ASTInterface $interface ) : void Restores an interface within the internal type scope.
restoreTrait ( PDepend\Source\AST\ASTTrait $trait ) : void Restores a trait within the internal type scope.
setCache ( PDepend\Util\Cache\CacheDriver $cache ) : PHPBuilder Setter method for the currently used token cache.

Защищенные методы

Метод Описание
buildClassInternal ( string $qualifiedName ) : PDepend\Source\AST\ASTClass Builds a new class instance or reuses a previous created class.
buildInterfaceInternal ( string $qualifiedName ) : PDepend\Source\AST\ASTInterface Builds a new new interface instance.
buildTraitInternal ( string $qualifiedName ) : PDepend\Source\AST\ASTTrait Builds a new trait instance or reuses a previous created trait.
checkBuilderState ( boolean $internal = false ) : void Checks that the parser is not frozen or a request is flagged as internal.
extractNamespaceName ( string $qualifiedName ) : string Extracts the package name of a qualified PHP 5.3 class identifier.
extractTypeName ( string $qualifiedName ) : string Extracts the type name of a qualified PHP 5.3 type identifier.
findClass ( string $qualifiedName ) : PDepend\Source\AST\ASTClass This method tries to find a class instance matching for the given qualified name in all scopes already processed. It will return the best matching instance or null if no match exists.
findInterface ( string $qualifiedName ) : PDepend\Source\AST\ASTInterface This method tries to find an interface instance matching for the given qualified name in all scopes already processed. It will return the best matching instance or null if no match exists.
findTrait ( string $qualifiedName ) : PDepend\Source\AST\ASTTrait This method tries to find a trait instance matching for the given qualified name in all scopes already processed. It will return the best matching instance or null if no match exists.
findType ( array $instances, string $qualifiedName ) : AbstractASTType This method tries to find an interface or class instance matching for the given qualified name in all scopes already processed. It will return the best matching instance or null if no match exists.
freeze ( ) : void This method will freeze the actual builder state and create a second runtime scope.
isDefault ( string $namespaceName ) : boolean Returns true if the given package is the default package.
storeClass ( string $className, string $namespaceName, PDepend\Source\AST\ASTClass $class ) : void This method will persist a class instance for later reuse.
storeInterface ( string $interfaceName, string $namespaceName, PDepend\Source\AST\ASTInterface $interface ) : void This method will persist an interface instance for later reuse.
storeTrait ( string $traitName, string $namespaceName, PDepend\Source\AST\ASTTrait $trait ) : void This method will persist a trait instance for later reuse.

Приватные методы

Метод Описание
buildAstNodeInstance ( string $className, string $image = null ) : PDepend\Source\AST\ASTNode Creates a {@link \PDepend\Source\AST\ASTNode} instance.
copyTypesWithPackage ( array $originalTypes ) : array Creates a copy of the given input array, but skips all types that do not contain a parent package.
getPreparedNamespaces ( ) : PDepend\Source\AST\ASTArtifactList Returns an iterator with all generated {@link \PDepend\Source\AST\ASTNamespace} objects.

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

__construct() публичный метод

Constructs a new builder instance.
public __construct ( )

buildAnonymousClass() публичный метод

Builds an anonymous class instance.
public buildAnonymousClass ( ) : ASTAnonymousClass
Результат PDepend\Source\AST\ASTAnonymousClass

buildAstAllocationExpression() публичный метод

Builds a new allocation expression node.
С версии: 0.9.6
public buildAstAllocationExpression ( string $image ) : PDepend\Source\AST\ASTAllocationExpression
$image string The source image of this expression.
Результат PDepend\Source\AST\ASTAllocationExpression

buildAstArguments() публичный метод

------------ Foo::bar($x, $y, $z); ------------ ------------ $foo->bar($x, $y, $z); ------------
С версии: 0.9.6
public buildAstArguments ( ) : PDepend\Source\AST\ASTArguments
Результат PDepend\Source\AST\ASTArguments

buildAstArray() публичный метод

Builds a new php array node.
С версии: 1.0.0
public buildAstArray ( ) : PDepend\Source\AST\ASTArray
Результат PDepend\Source\AST\ASTArray

buildAstArrayElement() публичный метод

Builds a new array element node.
С версии: 1.0.0
public buildAstArrayElement ( ) : PDepend\Source\AST\ASTArrayElement
Результат PDepend\Source\AST\ASTArrayElement

buildAstArrayIndexExpression() публичный метод

Builds a new array-expression node.
С версии: 0.9.12
public buildAstArrayIndexExpression ( ) : PDepend\Source\AST\ASTArrayIndexExpression
Результат PDepend\Source\AST\ASTArrayIndexExpression

buildAstAssignmentExpression() публичный метод

Builds a new assignment expression node.
С версии: 0.9.8
public buildAstAssignmentExpression ( string $image ) : PDepend\Source\AST\ASTAssignmentExpression
$image string The assignment operator.
Результат PDepend\Source\AST\ASTAssignmentExpression

buildAstBooleanAndExpression() публичный метод

Builds a new boolean and-expression.
С версии: 0.9.8
public buildAstBooleanAndExpression ( ) : PDepend\Source\AST\ASTBooleanAndExpression
Результат PDepend\Source\AST\ASTBooleanAndExpression

buildAstBooleanOrExpression() публичный метод

Builds a new boolean or-expression.
С версии: 0.9.8
public buildAstBooleanOrExpression ( ) : PDepend\Source\AST\ASTBooleanOrExpression
Результат PDepend\Source\AST\ASTBooleanOrExpression

buildAstBreakStatement() публичный метод

Builds a new break-statement node instance.
С версии: 0.9.12
public buildAstBreakStatement ( string $image ) : PDepend\Source\AST\ASTBreakStatement
$image string The source code image for this node.
Результат PDepend\Source\AST\ASTBreakStatement

buildAstCastExpression() публичный метод

Builds a new cast-expression node instance.
С версии: 0.10.0
public buildAstCastExpression ( string $image ) : PDepend\Source\AST\ASTCastExpression
$image string The cast-expression image/character.
Результат PDepend\Source\AST\ASTCastExpression

buildAstCatchStatement() публичный метод

Builds a new catch-statement node.
С версии: 0.9.8
public buildAstCatchStatement ( string $image ) : PDepend\Source\AST\ASTCatchStatement
$image string
Результат PDepend\Source\AST\ASTCatchStatement

buildAstClassFqnPostfix() публичный метод

----- Foo::class; ----- ----- $object::class; -----
С версии: 2.0.0
public buildAstClassFqnPostfix ( ) : PDepend\Source\AST\ASTClassFqnPostfix
Результат PDepend\Source\AST\ASTClassFqnPostfix

buildAstClassOrInterfaceReference() публичный метод

Builds a new code type reference instance.
С версии: 0.9.5
public buildAstClassOrInterfaceReference ( string $qualifiedName ) : PDepend\Source\AST\ASTClassOrInterfaceReference
$qualifiedName string The qualified name of the referenced type.
Результат PDepend\Source\AST\ASTClassOrInterfaceReference

buildAstClassReference() публичный метод

Builds a new code type reference instance.
С версии: 0.9.5
public buildAstClassReference ( string $qualifiedName ) : PDepend\Source\AST\ASTClassReference
$qualifiedName string The qualified name of the referenced type.
Результат PDepend\Source\AST\ASTClassReference

buildAstCloneExpression() публичный метод

Builds a new clone-expression node.
С версии: 0.9.12
public buildAstCloneExpression ( string $image ) : PDepend\Source\AST\ASTCloneExpression
$image string The source image of this expression.
Результат PDepend\Source\AST\ASTCloneExpression

buildAstClosure() публичный метод

Builds a new closure node.
С версии: 0.9.12
public buildAstClosure ( ) : PDepend\Source\AST\ASTClosure
Результат PDepend\Source\AST\ASTClosure

buildAstComment() публичный метод

Builds a new comment node instance.
С версии: 0.9.8
public buildAstComment ( string $cdata ) : PDepend\Source\AST\ASTComment
$cdata string The comment text.
Результат PDepend\Source\AST\ASTComment

buildAstCompoundExpression() публичный метод

Builds a new compound expression node.
С версии: 0.9.6
public buildAstCompoundExpression ( ) : PDepend\Source\AST\ASTCompoundExpression
Результат PDepend\Source\AST\ASTCompoundExpression

buildAstCompoundVariable() публичный метод

Builds a new compound variable node.
С версии: 0.9.6
public buildAstCompoundVariable ( string $image ) : PDepend\Source\AST\ASTCompoundVariable
$image string The source image for the compound variable.
Результат PDepend\Source\AST\ASTCompoundVariable

buildAstConditionalExpression() публичный метод

-------------- $bar = ($foo ? 42 : 23); --------------
С версии: 0.9.8
public buildAstConditionalExpression ( ) : PDepend\Source\AST\ASTConditionalExpression
Результат PDepend\Source\AST\ASTConditionalExpression

buildAstConstant() публичный метод

Builds a new constant node.
С версии: 0.9.6
public buildAstConstant ( string $image ) : PDepend\Source\AST\ASTConstant
$image string The source image for the constant.
Результат PDepend\Source\AST\ASTConstant

buildAstConstantDeclarator() публичный метод

class Foo { -------- const BAR = 42; -------- } Or in a comma separated constant defintion: class Foo { -------- const BAR = 42, -------- -------------- const BAZ = 'Foobar', -------------- ---------- const FOO = 3.14; ---------- }
С версии: 0.9.6
public buildAstConstantDeclarator ( string $image ) : PDepend\Source\AST\ASTConstantDeclarator
$image string The source code image for this node.
Результат PDepend\Source\AST\ASTConstantDeclarator

buildAstConstantDefinition() публичный метод

class Foo { ------------------------ const FOO = 42, BAR = 23; ------------------------ }
С версии: 0.9.6
public buildAstConstantDefinition ( string $image ) : PDepend\Source\AST\ASTConstantDefinition
$image string The source code image for this node.
Результат PDepend\Source\AST\ASTConstantDefinition

buildAstConstantPostfix() публичный метод

--- Foo::BAR; ---
С версии: 0.9.6
public buildAstConstantPostfix ( string $image ) : PDepend\Source\AST\ASTConstantPostfix
$image string The image of this node.
Результат PDepend\Source\AST\ASTConstantPostfix

buildAstContinueStatement() публичный метод

Builds a new continue-statement node instance.
С версии: 0.9.12
public buildAstContinueStatement ( string $image ) : PDepend\Source\AST\ASTContinueStatement
$image string The source code image for this node.
Результат PDepend\Source\AST\ASTContinueStatement

buildAstDeclareStatement() публичный метод

------------------------------- declare(encoding='ISO-8859-1'); ------------------------------- ------------------- declare(ticks=42) { ... } - ------------------ declare(ticks=42): ... enddeclare; -----------
С версии: 0.10.0
public buildAstDeclareStatement ( ) : PDepend\Source\AST\ASTDeclareStatement
Результат PDepend\Source\AST\ASTDeclareStatement

buildAstDoWhileStatement() публичный метод

Builds a new do/while-statement node.
С версии: 0.9.12
public buildAstDoWhileStatement ( string $image ) : PDepend\Source\AST\ASTDoWhileStatement
$image string The source image of this statement.
Результат PDepend\Source\AST\ASTDoWhileStatement

buildAstEchoStatement() публичный метод

Builds a new exit-statement instance.
С версии: 0.9.12
public buildAstEchoStatement ( string $image ) : PDepend\Source\AST\ASTEchoStatement
$image string The source code image for this node.
Результат PDepend\Source\AST\ASTEchoStatement

buildAstElseIfStatement() публичный метод

Builds a new elseif statement node.
С версии: 0.9.8
public buildAstElseIfStatement ( string $image ) : PDepend\Source\AST\ASTElseIfStatement
$image string The source image of this statement.
Результат PDepend\Source\AST\ASTElseIfStatement

buildAstEvalExpression() публичный метод

Builds a new eval-expression node.
С версии: 0.9.12
public buildAstEvalExpression ( string $image ) : PDepend\Source\AST\ASTEvalExpression
$image string The source image of this expression.
Результат PDepend\Source\AST\ASTEvalExpression

buildAstExitExpression() публичный метод

Builds a new exit-expression instance.
С версии: 0.9.12
public buildAstExitExpression ( string $image ) : PDepend\Source\AST\ASTExitExpression
$image string The source code image for this node.
Результат PDepend\Source\AST\ASTExitExpression

buildAstExpression() публичный метод

Builds a new expression node.
С версии: 0.9.8
public buildAstExpression ( string $image = null ) : PDepend\Source\AST\ASTExpression
$image string
Результат PDepend\Source\AST\ASTExpression

buildAstFieldDeclaration() публичный метод

Builds a new field declaration node.
С версии: 0.9.6
public buildAstFieldDeclaration ( ) : PDepend\Source\AST\ASTFieldDeclaration
Результат PDepend\Source\AST\ASTFieldDeclaration

buildAstFinallyStatement() публичный метод

Builds a new finally-statement node.
С версии: 2.0.0
public buildAstFinallyStatement ( ) : PDepend\Source\AST\ASTFinallyStatement
Результат PDepend\Source\AST\ASTFinallyStatement

buildAstForInit() публичный метод

------------------------ for ($x = 0, $y = 23, $z = 42; $x < $y; ++$x) } ------------------------
С версии: 0.9.8
public buildAstForInit ( ) : PDepend\Source\AST\ASTForInit
Результат PDepend\Source\AST\ASTForInit

buildAstForStatement() публичный метод

Builds a new for statement node.
С версии: 0.9.8
public buildAstForStatement ( string $image ) : PDepend\Source\AST\ASTForStatement
$image string The source image of this statement.
Результат PDepend\Source\AST\ASTForStatement

buildAstForUpdate() публичный метод

------------------------------- for ($x = 0, $y = 23, $z = 42; $x < $y; ++$x, $y = $x + 1, $z = $x + 2) } -------------------------------
С версии: 0.9.12
public buildAstForUpdate ( ) : PDepend\Source\AST\ASTForUpdate
Результат PDepend\Source\AST\ASTForUpdate

buildAstForeachStatement() публичный метод

Builds a new foreach-statement node.
С версии: 0.9.8
public buildAstForeachStatement ( string $image ) : PDepend\Source\AST\ASTForeachStatement
$image string The source image of this statement.
Результат PDepend\Source\AST\ASTForeachStatement

buildAstFormalParameter() публичный метод

Builds a new formal parameter node.
С версии: 0.9.6
public buildAstFormalParameter ( ) : PDepend\Source\AST\ASTFormalParameter
Результат PDepend\Source\AST\ASTFormalParameter

buildAstFormalParameters() публичный метод

Builds a new formal parameters node.
С версии: 0.9.6
public buildAstFormalParameters ( ) : PDepend\Source\AST\ASTFormalParameters
Результат PDepend\Source\AST\ASTFormalParameters

buildAstFunctionPostfix() публичный метод

------- foo($bar); ------- -------- $foo($bar); --------
С версии: 0.9.6
public buildAstFunctionPostfix ( string $image ) : PDepend\Source\AST\ASTFunctionPostfix
$image string The image of this node.
Результат PDepend\Source\AST\ASTFunctionPostfix

buildAstGlobalStatement() публичный метод

Builds a new global-statement instance.
С версии: 0.9.12
public buildAstGlobalStatement ( ) : PDepend\Source\AST\ASTGlobalStatement
Результат PDepend\Source\AST\ASTGlobalStatement

buildAstGotoStatement() публичный метод

Builds a new goto-statement instance.
С версии: 0.9.12
public buildAstGotoStatement ( string $image ) : PDepend\Source\AST\ASTGotoStatement
$image string The source code image for this node.
Результат PDepend\Source\AST\ASTGotoStatement

buildAstHeredoc() публичный метод

Builds a new heredoc node.
С версии: 0.9.12
public buildAstHeredoc ( ) : PDepend\Source\AST\ASTHeredoc
Результат PDepend\Source\AST\ASTHeredoc

buildAstIdentifier() публичный метод

Builds a new identifier node.
С версии: 0.9.6
public buildAstIdentifier ( string $image ) : PDepend\Source\AST\ASTIdentifier
$image string The image of this identifier.
Результат PDepend\Source\AST\ASTIdentifier

buildAstIfStatement() публичный метод

Builds a new if statement node.
С версии: 0.9.8
public buildAstIfStatement ( string $image ) : PDepend\Source\AST\ASTIfStatement
$image string The source image of this statement.
Результат PDepend\Source\AST\ASTIfStatement

buildAstIncludeExpression() публичный метод

Builds a new include- or include_once-expression.
С версии: 0.9.12
public buildAstIncludeExpression ( ) : PDepend\Source\AST\ASTIncludeExpression
Результат PDepend\Source\AST\ASTIncludeExpression

buildAstInstanceOfExpression() публичный метод

Builds a new instanceof expression node.
С версии: 0.9.6
public buildAstInstanceOfExpression ( string $image ) : PDepend\Source\AST\ASTInstanceOfExpression
$image string The source image of this expression.
Результат PDepend\Source\AST\ASTInstanceOfExpression

buildAstIssetExpression() публичный метод

----------- if (isset($foo)) { ----------- } ----------------------- if (isset($foo, $bar, $baz)) { ----------------------- }
С версии: 0.9.12
public buildAstIssetExpression ( ) : PDepend\Source\AST\ASTIssetExpression
Результат PDepend\Source\AST\ASTIssetExpression

buildAstLabelStatement() публичный метод

Builds a new label-statement instance.
С версии: 0.9.12
public buildAstLabelStatement ( string $image ) : PDepend\Source\AST\ASTLabelStatement
$image string The source code image for this node.
Результат PDepend\Source\AST\ASTLabelStatement

buildAstListExpression() публичный метод

Builds a new list-expression node.
С версии: 0.9.12
public buildAstListExpression ( string $image ) : PDepend\Source\AST\ASTListExpression
$image string The source image of this expression.
Результат PDepend\Source\AST\ASTListExpression

buildAstLiteral() публичный метод

Builds a new literal node.
С версии: 0.9.6
public buildAstLiteral ( string $image ) : PDepend\Source\AST\ASTLiteral
$image string The source image for the literal node.
Результат PDepend\Source\AST\ASTLiteral

buildAstLogicalAndExpression() публичный метод

Builds a new logical and-expression.
С версии: 0.9.8
public buildAstLogicalAndExpression ( ) : PDepend\Source\AST\ASTLogicalAndExpression
Результат PDepend\Source\AST\ASTLogicalAndExpression

buildAstLogicalOrExpression() публичный метод

Builds a new logical or-expression.
С версии: 0.9.8
public buildAstLogicalOrExpression ( ) : PDepend\Source\AST\ASTLogicalOrExpression
Результат PDepend\Source\AST\ASTLogicalOrExpression

buildAstLogicalXorExpression() публичный метод

Builds a new logical xor-expression.
С версии: 0.9.8
public buildAstLogicalXorExpression ( ) : PDepend\Source\AST\ASTLogicalXorExpression
Результат PDepend\Source\AST\ASTLogicalXorExpression

buildAstMemberPrimaryPrefix() публичный метод

-------- Foo::bar(); -------- --------- Foo::$bar(); --------- --------- $obj->bar(); --------- ---------- $obj->$bar(); ----------
С версии: 0.9.6
public buildAstMemberPrimaryPrefix ( string $image ) : PDepend\Source\AST\ASTMemberPrimaryPrefix
$image string The source image of this expression.
Результат PDepend\Source\AST\ASTMemberPrimaryPrefix

buildAstMethodPostfix() публичный метод

--------- Foo::bar($baz); --------- ---------- Foo::$bar($baz); ----------
С версии: 0.9.6
public buildAstMethodPostfix ( string $image ) : PDepend\Source\AST\ASTMethodPostfix
$image string The image of this node.
Результат PDepend\Source\AST\ASTMethodPostfix

buildAstParentReference() публичный метод

Builds a new parent reference instance.
С версии: 0.9.6
public buildAstParentReference ( PDepend\Source\AST\ASTClassOrInterfaceReference $reference ) : PDepend\Source\AST\ASTParentReference
$reference PDepend\Source\AST\ASTClassOrInterfaceReference The type instance that reference the concrete target of parent.
Результат PDepend\Source\AST\ASTParentReference

buildAstPostfixExpression() публичный метод

Builds a new postfix-expression node instance.
С версии: 0.10.0
public buildAstPostfixExpression ( string $image ) : PDepend\Source\AST\ASTPostfixExpression
$image string The postfix-expression image/character.
Результат PDepend\Source\AST\ASTPostfixExpression

buildAstPreDecrementExpression() публичный метод

Builds a new pre-decrement-expression node instance.
С версии: 0.10.0
public buildAstPreDecrementExpression ( ) : PDepend\Source\AST\ASTPreDecrementExpression
Результат PDepend\Source\AST\ASTPreDecrementExpression

buildAstPreIncrementExpression() публичный метод

Builds a new pre-increment-expression node instance.
С версии: 0.10.0
public buildAstPreIncrementExpression ( ) : PDepend\Source\AST\ASTPreIncrementExpression
Результат PDepend\Source\AST\ASTPreIncrementExpression

buildAstPrintExpression() публичный метод

------------- print "qafoo"; -------------
С версии: 2.3
public buildAstPrintExpression ( ) : PDepend\Source\AST\ASTConditionalExpression
Результат PDepend\Source\AST\ASTConditionalExpression

buildAstPropertyPostfix() публичный метод

---- Foo::$bar; ---- --- $object->bar; ---
С версии: 0.9.6
public buildAstPropertyPostfix ( string $image ) : PDepend\Source\AST\ASTPropertyPostfix
$image string The image of this node.
Результат PDepend\Source\AST\ASTPropertyPostfix

buildAstRequireExpression() публичный метод

Builds a new require- or require_once-expression.
С версии: 0.9.12
public buildAstRequireExpression ( ) : PDepend\Source\AST\ASTRequireExpression
Результат PDepend\Source\AST\ASTRequireExpression

buildAstReturnStatement() публичный метод

Builds a new return statement node instance.
С версии: 0.9.12
public buildAstReturnStatement ( string $image ) : PDepend\Source\AST\ASTReturnStatement
$image string The source code image for this node.
Результат PDepend\Source\AST\ASTReturnStatement

buildAstScalarType() публичный метод

Builds a new primitive type node.
С версии: 0.9.6
public buildAstScalarType ( string $image ) : PDepend\Source\AST\ASTScalarType
$image string The source image for the primitive type.
Результат PDepend\Source\AST\ASTScalarType

buildAstScope() публичный метод

Builds a new function/method scope instance.
С версии: 0.9.12
public buildAstScope ( ) : PDepend\Source\AST\ASTScope
Результат PDepend\Source\AST\ASTScope

buildAstScopeStatement() публичный метод

Builds a new scope-statement instance.
С версии: 0.9.12
public buildAstScopeStatement ( ) : PDepend\Source\AST\ASTScopeStatement
Результат PDepend\Source\AST\ASTScopeStatement

buildAstSelfReference() публичный метод

Builds a new self reference instance.
С версии: 0.9.6
public buildAstSelfReference ( PDepend\Source\AST\AbstractASTClassOrInterface $type ) : PDepend\Source\AST\ASTSelfReference
$type PDepend\Source\AST\AbstractASTClassOrInterface
Результат PDepend\Source\AST\ASTSelfReference

buildAstShiftLeftExpression() публичный метод

Build a new shift left expression.
С версии: 1.0.1
public buildAstShiftLeftExpression ( ) : PDepend\Source\AST\ASTShiftLeftExpression
Результат PDepend\Source\AST\ASTShiftLeftExpression

buildAstShiftRightExpression() публичный метод

Build a new shift right expression.
С версии: 1.0.1
public buildAstShiftRightExpression ( ) : PDepend\Source\AST\ASTShiftRightExpression
Результат PDepend\Source\AST\ASTShiftRightExpression

buildAstStatement() публичный метод

Builds a new statement instance.
С версии: 0.9.12
public buildAstStatement ( ) : PDepend\Source\AST\ASTStatement
Результат PDepend\Source\AST\ASTStatement

buildAstStaticReference() публичный метод

Builds a new static reference instance.
С версии: 0.9.6
public buildAstStaticReference ( PDepend\Source\AST\AbstractASTClassOrInterface $owner ) : PDepend\Source\AST\ASTStaticReference
$owner PDepend\Source\AST\AbstractASTClassOrInterface
Результат PDepend\Source\AST\ASTStaticReference

buildAstStaticVariableDeclaration() публичный метод

Builds a new static variable declaration node.
С версии: 0.9.6
public buildAstStaticVariableDeclaration ( string $image ) : PDepend\Source\AST\ASTStaticVariableDeclaration
$image string The source image for the statuc declaration.
Результат PDepend\Source\AST\ASTStaticVariableDeclaration

buildAstString() публичный метод

$string = "Manuel $Pichler <{$email}>"; \PDepend\Source\AST\ASTString |-- ASTLiteral - "Manuel ") |-- ASTVariable - $Pichler |-- ASTLiteral - " <" |-- ASTCompoundExpression - {...} | |-- ASTVariable - $email |-- ASTLiteral - ">"
С версии: 0.9.10
public buildAstString ( ) : PDepend\Source\AST\ASTString
Результат PDepend\Source\AST\ASTString

buildAstStringIndexExpression() публичный метод

-------- $string{$index} --------
С версии: 0.9.12
public buildAstStringIndexExpression ( ) : PDepend\Source\AST\ASTStringIndexExpression
Результат PDepend\Source\AST\ASTStringIndexExpression

buildAstSwitchLabel() публичный метод

Builds a new switch-label node.
С версии: 0.9.8
public buildAstSwitchLabel ( string $image ) : PDepend\Source\AST\ASTSwitchLabel
$image string The source image of this label.
Результат PDepend\Source\AST\ASTSwitchLabel

buildAstSwitchStatement() публичный метод

Builds a new switch-statement-node.
С версии: 0.9.8
public buildAstSwitchStatement ( ) : PDepend\Source\AST\ASTSwitchStatement
Результат PDepend\Source\AST\ASTSwitchStatement

buildAstThrowStatement() публичный метод

Builds a new throw-statement instance.
С версии: 0.9.12
public buildAstThrowStatement ( string $image ) : PDepend\Source\AST\ASTThrowStatement
$image string The source code image for this node.
Результат PDepend\Source\AST\ASTThrowStatement

buildAstTraitAdaptation() публичный метод

Builds a new trait adaptation scope
С версии: 1.0.0
public buildAstTraitAdaptation ( ) : PDepend\Source\AST\ASTTraitAdaptation
Результат PDepend\Source\AST\ASTTraitAdaptation

buildAstTraitAdaptationAlias() публичный метод

Builds a new trait adaptation alias statement.
С версии: 1.0.0
public buildAstTraitAdaptationAlias ( string $image ) : PDepend\Source\AST\ASTTraitAdaptationAlias
$image string The trait method name.
Результат PDepend\Source\AST\ASTTraitAdaptationAlias

buildAstTraitAdaptationPrecedence() публичный метод

Builds a new trait adaptation precedence statement.
С версии: 1.0.0
public buildAstTraitAdaptationPrecedence ( string $image ) : PDepend\Source\AST\ASTTraitAdaptationPrecedence
$image string The trait method name.
Результат PDepend\Source\AST\ASTTraitAdaptationPrecedence

buildAstTraitReference() публичный метод

Builds a new trait reference node.
С версии: 1.0.0
public buildAstTraitReference ( string $qualifiedName ) : PDepend\Source\AST\ASTTraitReference
$qualifiedName string The full qualified trait name.
Результат PDepend\Source\AST\ASTTraitReference

buildAstTraitUseStatement() публичный метод

Builds a new trait use-statement node.
С версии: 1.0.0
public buildAstTraitUseStatement ( ) : PDepend\Source\AST\ASTTraitUseStatement
Результат PDepend\Source\AST\ASTTraitUseStatement

buildAstTryStatement() публичный метод

Builds a new try-statement instance.
С версии: 0.9.12
public buildAstTryStatement ( string $image ) : PDepend\Source\AST\ASTTryStatement
$image string The source code image for this node.
Результат PDepend\Source\AST\ASTTryStatement

buildAstTypeArray() публичный метод

Builds a new array type node.
С версии: 0.9.6
public buildAstTypeArray ( ) : PDepend\Source\AST\ASTTypeArray
Результат PDepend\Source\AST\ASTTypeArray

buildAstTypeCallable() публичный метод

Builds a new node for the callable type.
С версии: 1.0.0
public buildAstTypeCallable ( ) : PDepend\Source\AST\ASTTypeCallable
Результат PDepend\Source\AST\ASTTypeCallable

buildAstUnaryExpression() публичный метод

Builds a new unary expression node instance.
С версии: 0.9.11
public buildAstUnaryExpression ( string $image ) : PDepend\Source\AST\ASTUnaryExpression
$image string The unary expression image/character.
Результат PDepend\Source\AST\ASTUnaryExpression

buildAstUnsetStatement() публичный метод

Builds a new unset-statement instance.
С версии: 0.9.12
public buildAstUnsetStatement ( ) : PDepend\Source\AST\ASTUnsetStatement
Результат PDepend\Source\AST\ASTUnsetStatement

buildAstVariable() публичный метод

Builds a new variable node.
С версии: 0.9.6
public buildAstVariable ( string $image ) : PDepend\Source\AST\ASTVariable
$image string The source image for the variable.
Результат PDepend\Source\AST\ASTVariable

buildAstVariableDeclarator() публичный метод

Builds a new variable declarator node.
С версии: 0.9.6
public buildAstVariableDeclarator ( string $image ) : PDepend\Source\AST\ASTVariableDeclarator
$image string The source image for the variable declarator.
Результат PDepend\Source\AST\ASTVariableDeclarator

buildAstVariableVariable() публичный метод

Builds a new variable variable node.
С версии: 0.9.6
public buildAstVariableVariable ( string $image ) : PDepend\Source\AST\ASTVariableVariable
$image string The source image for the variable variable.
Результат PDepend\Source\AST\ASTVariableVariable

buildAstWhileStatement() публичный метод

Builds a new while-statement node.
С версии: 0.9.8
public buildAstWhileStatement ( string $image ) : PDepend\Source\AST\ASTWhileStatement
$image string The source image of this statement.
Результат PDepend\Source\AST\ASTWhileStatement

buildAstYieldStatement() публичный метод

Builds a new yield-statement instance.
public buildAstYieldStatement ( string $image ) : PDepend\Source\AST\ASTYieldStatement
$image string The source code image for this node.
Результат PDepend\Source\AST\ASTYieldStatement

buildClass() публичный метод

Where possible you should give a qualified class name, that is prefixed with the package identifier. $builder->buildClass('php::depend::Parser'); To determine the correct class, this method implements the following algorithm.
  1. Check for an exactly matching instance and reuse it.
  2. Check for a class instance that belongs to the default package. If such an instance exists, reuse it and replace the default package with the newly given package information.
  3. Check that the requested class is in the default package, if this is true, reuse the first class instance and ignore the default package.
  4. Create a new instance for the specified package.
public buildClass ( string $name ) : PDepend\Source\AST\ASTClass
$name string The class name.
Результат PDepend\Source\AST\ASTClass The created class object.

buildClassInternal() защищенный метод

Where possible you should give a qualified class name, that is prefixed with the package identifier. $builder->buildClass('php::depend::Parser'); To determine the correct class, this method implements the following algorithm.
  1. Check for an exactly matching instance and reuse it.
  2. Check for a class instance that belongs to the default package. If such an instance exists, reuse it and replace the default package with the newly given package information.
  3. Check that the requested class is in the default package, if this is true, reuse the first class instance and ignore the default package.
  4. Create a new instance for the specified package.
С версии: 0.9.5
protected buildClassInternal ( string $qualifiedName ) : PDepend\Source\AST\ASTClass
$qualifiedName string
Результат PDepend\Source\AST\ASTClass

buildFunction() публичный метод

Builds a new function instance.
public buildFunction ( string $name ) : PDepend\Source\AST\ASTFunction
$name string The function name.
Результат PDepend\Source\AST\ASTFunction

buildInterface() публичный метод

If there is an existing class instance for the given name, this method checks if this class is part of the default namespace. If this is the case this method will update all references to the new interface and it removes the class instance. Otherwise it creates new interface instance. Where possible you should give a qualified interface name, that is prefixed with the package identifier. $builder->buildInterface('php::depend::Parser'); To determine the correct interface, this method implements the following algorithm.
  1. Check for an exactly matching instance and reuse it.
  2. Check for a interface instance that belongs to the default package. If such an instance exists, reuse it and replace the default package with the newly given package information.
  3. Check that the requested interface is in the default package, if this is true, reuse the first interface instance and ignore the default package.
  4. Create a new instance for the specified package.
public buildInterface ( string $name ) : PDepend\Source\AST\ASTInterface
$name string The interface name.
Результат PDepend\Source\AST\ASTInterface

buildInterfaceInternal() защищенный метод

If there is an existing interface instance for the given name, this method checks if this interface is part of the default namespace. If this is the case this method will update all references to the new interface and it removes the class instance. Otherwise it creates new interface instance. Where possible you should give a qualified interface name, that is prefixed with the package identifier. $builder->buildInterface('php::depend::Parser'); To determine the correct interface, this method implements the following algorithm.
  1. Check for an exactly matching instance and reuse it.
  2. Check for a interface instance that belongs to the default package. If such an instance exists, reuse it and replace the default package with the newly given package information.
  3. Check that the requested interface is in the default package, if this is true, reuse the first interface instance and ignore the default package.
  4. Create a new instance for the specified package.
С версии: 0.9.5
protected buildInterfaceInternal ( string $qualifiedName ) : PDepend\Source\AST\ASTInterface
$qualifiedName string
Результат PDepend\Source\AST\ASTInterface

buildMethod() публичный метод

Builds a new method instance.
public buildMethod ( string $name ) : PDepend\Source\AST\ASTMethod
$name string
Результат PDepend\Source\AST\ASTMethod

buildNamespace() публичный метод

Builds a new package instance.
public buildNamespace ( string $name ) : PDepend\Source\AST\ASTNamespace
$name string The package name.
Результат PDepend\Source\AST\ASTNamespace

buildTrait() публичный метод

Builds a new php trait instance.
С версии: 1.0.0
public buildTrait ( string $qualifiedName ) : PDepend\Source\AST\ASTTrait
$qualifiedName string The full qualified trait name.
Результат PDepend\Source\AST\ASTTrait

buildTraitInternal() защищенный метод

Where possible you should give a qualified trait name, that is prefixed with the package identifier. $builder->buildTrait('php::depend::Parser'); To determine the correct trait, this method implements the following algorithm.
  1. Check for an exactly matching instance and reuse it.
  2. Check for a class instance that belongs to the default package. If such an instance exists, reuse it and replace the default package with the newly given package information.
  3. Check that the requested trait is in the default package, if this is true, reuse the first trait instance and ignore the default package.
  4. Create a new instance for the specified package.
С версии: 0.9.5
protected buildTraitInternal ( string $qualifiedName ) : PDepend\Source\AST\ASTTrait
$qualifiedName string
Результат PDepend\Source\AST\ASTTrait

checkBuilderState() защищенный метод

Checks that the parser is not frozen or a request is flagged as internal.
С версии: 0.9.5
protected checkBuilderState ( boolean $internal = false ) : void
$internal boolean The new internal flag value.
Результат void

extractNamespaceName() защищенный метод

If the class name doesn't contain a package identifier this method will return the default identifier. $namespaceName = $this->extractPackageName('foo\bar\foobar'); var_dump($namespaceName); Results in: string(8) "foo\bar" $namespaceName = $this->extractPackageName('foobar'); var_dump($namespaceName); Results in: string(6) "+global"
protected extractNamespaceName ( string $qualifiedName ) : string
$qualifiedName string The qualified PHP 5.3 class identifier.
Результат string

extractTypeName() защищенный метод

$typeName = $this->extractTypeName('foo\bar\foobar'); var_dump($typeName); Results in: string(6) "foobar"
protected extractTypeName ( string $qualifiedName ) : string
$qualifiedName string The qualified PHP 5.3 type identifier.
Результат string

findClass() защищенный метод

This method tries to find a class instance matching for the given qualified name in all scopes already processed. It will return the best matching instance or null if no match exists.
С версии: 0.9.5
protected findClass ( string $qualifiedName ) : PDepend\Source\AST\ASTClass
$qualifiedName string
Результат PDepend\Source\AST\ASTClass

findInterface() защищенный метод

This method tries to find an interface instance matching for the given qualified name in all scopes already processed. It will return the best matching instance or null if no match exists.
С версии: 0.9.5
protected findInterface ( string $qualifiedName ) : PDepend\Source\AST\ASTInterface
$qualifiedName string
Результат PDepend\Source\AST\ASTInterface

findTrait() защищенный метод

This method tries to find a trait instance matching for the given qualified name in all scopes already processed. It will return the best matching instance or null if no match exists.
С версии: 0.9.5
protected findTrait ( string $qualifiedName ) : PDepend\Source\AST\ASTTrait
$qualifiedName string
Результат PDepend\Source\AST\ASTTrait

findType() защищенный метод

This method tries to find an interface or class instance matching for the given qualified name in all scopes already processed. It will return the best matching instance or null if no match exists.
С версии: 0.9.5
protected findType ( array $instances, string $qualifiedName ) : AbstractASTType
$instances array
$qualifiedName string
Результат PDepend\Source\AST\AbstractASTType

freeze() защищенный метод

This method will freeze the actual builder state and create a second runtime scope.
С версии: 0.9.5
protected freeze ( ) : void
Результат void

getClass() публичный метод

This method will try to find an already existing instance for the given qualified name. It will create a new {@link \PDepend\Source\AST\ASTClass} instance when no matching type exists.
С версии: 0.9.5
public getClass ( string $qualifiedName ) : PDepend\Source\AST\ASTClass
$qualifiedName string The full qualified type identifier.
Результат PDepend\Source\AST\ASTClass

getClassOrInterface() публичный метод

This method will try to find an already existing instance for the given qualified name. It will create a new {@link \PDepend\Source\AST\ASTClass} instance when no matching type exists.
С версии: 0.9.5
public getClassOrInterface ( string $qualifiedName ) : PDepend\Source\AST\AbstractASTClassOrInterface
$qualifiedName string
Результат PDepend\Source\AST\AbstractASTClassOrInterface

getInterface() публичный метод

This method will try to find an already existing instance for the given qualified name. It will create a new {@link \PDepend\Source\AST\ASTInterface} instance when no matching type exists.
С версии: 0.9.5
public getInterface ( string $qualifiedName ) : PDepend\Source\AST\ASTInterface
$qualifiedName string
Результат PDepend\Source\AST\ASTInterface

getIterator() публичный метод

Returns an iterator with all generated {@link \PDepend\Source\AST\ASTNamespace} objects.
public getIterator ( ) : PDepend\Source\AST\ASTArtifactList
Результат PDepend\Source\AST\ASTArtifactList

getNamespaces() публичный метод

Returns an iterator with all generated {@link \PDepend\Source\AST\ASTNamespace} objects.
public getNamespaces ( ) : PDepend\Source\AST\ASTNamespace[]
Результат PDepend\Source\AST\ASTNamespace[]

getTrait() публичный метод

This method will try to find an already existing instance for the given qualified name. It will create a new {@link \PDepend\Source\AST\ASTTrait} instance when no matching type exists.
С версии: 1.0.0
public getTrait ( string $qualifiedName ) : PDepend\Source\AST\ASTTrait
$qualifiedName string
Результат PDepend\Source\AST\ASTTrait

isDefault() защищенный метод

Returns true if the given package is the default package.
protected isDefault ( string $namespaceName ) : boolean
$namespaceName string The package name.
Результат boolean

restoreClass() публичный метод

Restores a class within the internal type scope.
С версии: 0.10.0
public restoreClass ( PDepend\Source\AST\ASTClass $class ) : void
$class PDepend\Source\AST\ASTClass
Результат void

restoreFunction() публичный метод

Restores a function within the internal type scope.
С версии: 0.10.0
public restoreFunction ( PDepend\Source\AST\ASTFunction $function ) : void
$function PDepend\Source\AST\ASTFunction
Результат void

restoreInterface() публичный метод

Restores an interface within the internal type scope.
С версии: 0.10.0
public restoreInterface ( PDepend\Source\AST\ASTInterface $interface ) : void
$interface PDepend\Source\AST\ASTInterface
Результат void

restoreTrait() публичный метод

Restores a trait within the internal type scope.
С версии: 0.10.0
public restoreTrait ( PDepend\Source\AST\ASTTrait $trait ) : void
$trait PDepend\Source\AST\ASTTrait
Результат void

setCache() публичный метод

Setter method for the currently used token cache.
С версии: 0.10.0
public setCache ( PDepend\Util\Cache\CacheDriver $cache ) : PHPBuilder
$cache PDepend\Util\Cache\CacheDriver
Результат PHPBuilder

storeClass() защищенный метод

This method will persist a class instance for later reuse.
protected storeClass ( string $className, string $namespaceName, PDepend\Source\AST\ASTClass $class ) : void
$className string
$namespaceName string
$class PDepend\Source\AST\ASTClass
Результат void

storeInterface() защищенный метод

This method will persist an interface instance for later reuse.
protected storeInterface ( string $interfaceName, string $namespaceName, PDepend\Source\AST\ASTInterface $interface ) : void
$interfaceName string
$namespaceName string
$interface PDepend\Source\AST\ASTInterface
Результат void

storeTrait() защищенный метод

This method will persist a trait instance for later reuse.
protected storeTrait ( string $traitName, string $namespaceName, PDepend\Source\AST\ASTTrait $trait ) : void
$traitName string
$namespaceName string
$trait PDepend\Source\AST\ASTTrait
Результат void

Описание свойств

$cache защищенное свойство

The internal used cache instance.
С версии: 0.10.0
protected CacheDriver,PDepend\Util\Cache $cache
Результат PDepend\Util\Cache\CacheDriver

$context защищенное свойство

The ast builder context.
С версии: 0.10.0
protected BuilderContext,PDepend\Source\Builder $context
Результат PDepend\Source\Builder\BuilderContext

$defaultCompilationUnit защищенное свойство

Default source file that acts as a dummy.
protected ASTCompilationUnit,PDepend\Source\AST $defaultCompilationUnit
Результат PDepend\Source\AST\ASTCompilationUnit

$defaultPackage защищенное свойство

Default package which contains all functions and classes with an unknown scope.
protected ASTNamespace,PDepend\Source\AST $defaultPackage
Результат PDepend\Source\AST\ASTNamespace