PHP Class PDepend\Source\Language\PHP\PHPBuilder

Inheritance: implements PDepend\Source\Builder\Builder
Afficher le fichier Open project: pdepend/pdepend Class Usage Examples

Protected Properties

Свойство Type Description
$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.

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

__construct() public méthode

Constructs a new builder instance.
public __construct ( )

buildAnonymousClass() public méthode

Builds an anonymous class instance.
public buildAnonymousClass ( ) : ASTAnonymousClass
Résultat PDepend\Source\AST\ASTAnonymousClass

buildAstAllocationExpression() public méthode

Builds a new allocation expression node.
Since: 0.9.6
public buildAstAllocationExpression ( string $image ) : PDepend\Source\AST\ASTAllocationExpression
$image string The source image of this expression.
Résultat PDepend\Source\AST\ASTAllocationExpression

buildAstArguments() public méthode

------------ Foo::bar($x, $y, $z); ------------ ------------ $foo->bar($x, $y, $z); ------------
Since: 0.9.6
public buildAstArguments ( ) : PDepend\Source\AST\ASTArguments
Résultat PDepend\Source\AST\ASTArguments

buildAstArray() public méthode

Builds a new php array node.
Since: 1.0.0
public buildAstArray ( ) : PDepend\Source\AST\ASTArray
Résultat PDepend\Source\AST\ASTArray

buildAstArrayElement() public méthode

Builds a new array element node.
Since: 1.0.0
public buildAstArrayElement ( ) : PDepend\Source\AST\ASTArrayElement
Résultat PDepend\Source\AST\ASTArrayElement

buildAstArrayIndexExpression() public méthode

Builds a new array-expression node.
Since: 0.9.12
public buildAstArrayIndexExpression ( ) : PDepend\Source\AST\ASTArrayIndexExpression
Résultat PDepend\Source\AST\ASTArrayIndexExpression

buildAstAssignmentExpression() public méthode

Builds a new assignment expression node.
Since: 0.9.8
public buildAstAssignmentExpression ( string $image ) : PDepend\Source\AST\ASTAssignmentExpression
$image string The assignment operator.
Résultat PDepend\Source\AST\ASTAssignmentExpression

buildAstBooleanAndExpression() public méthode

Builds a new boolean and-expression.
Since: 0.9.8
public buildAstBooleanAndExpression ( ) : PDepend\Source\AST\ASTBooleanAndExpression
Résultat PDepend\Source\AST\ASTBooleanAndExpression

buildAstBooleanOrExpression() public méthode

Builds a new boolean or-expression.
Since: 0.9.8
public buildAstBooleanOrExpression ( ) : PDepend\Source\AST\ASTBooleanOrExpression
Résultat PDepend\Source\AST\ASTBooleanOrExpression

buildAstBreakStatement() public méthode

Builds a new break-statement node instance.
Since: 0.9.12
public buildAstBreakStatement ( string $image ) : PDepend\Source\AST\ASTBreakStatement
$image string The source code image for this node.
Résultat PDepend\Source\AST\ASTBreakStatement

buildAstCastExpression() public méthode

Builds a new cast-expression node instance.
Since: 0.10.0
public buildAstCastExpression ( string $image ) : PDepend\Source\AST\ASTCastExpression
$image string The cast-expression image/character.
Résultat PDepend\Source\AST\ASTCastExpression

buildAstCatchStatement() public méthode

Builds a new catch-statement node.
Since: 0.9.8
public buildAstCatchStatement ( string $image ) : PDepend\Source\AST\ASTCatchStatement
$image string
Résultat PDepend\Source\AST\ASTCatchStatement

buildAstClassFqnPostfix() public méthode

----- Foo::class; ----- ----- $object::class; -----
Since: 2.0.0
public buildAstClassFqnPostfix ( ) : PDepend\Source\AST\ASTClassFqnPostfix
Résultat PDepend\Source\AST\ASTClassFqnPostfix

buildAstClassOrInterfaceReference() public méthode

Builds a new code type reference instance.
Since: 0.9.5
public buildAstClassOrInterfaceReference ( string $qualifiedName ) : PDepend\Source\AST\ASTClassOrInterfaceReference
$qualifiedName string The qualified name of the referenced type.
Résultat PDepend\Source\AST\ASTClassOrInterfaceReference

buildAstClassReference() public méthode

Builds a new code type reference instance.
Since: 0.9.5
public buildAstClassReference ( string $qualifiedName ) : PDepend\Source\AST\ASTClassReference
$qualifiedName string The qualified name of the referenced type.
Résultat PDepend\Source\AST\ASTClassReference

buildAstCloneExpression() public méthode

Builds a new clone-expression node.
Since: 0.9.12
public buildAstCloneExpression ( string $image ) : PDepend\Source\AST\ASTCloneExpression
$image string The source image of this expression.
Résultat PDepend\Source\AST\ASTCloneExpression

buildAstClosure() public méthode

Builds a new closure node.
Since: 0.9.12
public buildAstClosure ( ) : PDepend\Source\AST\ASTClosure
Résultat PDepend\Source\AST\ASTClosure

buildAstComment() public méthode

Builds a new comment node instance.
Since: 0.9.8
public buildAstComment ( string $cdata ) : PDepend\Source\AST\ASTComment
$cdata string The comment text.
Résultat PDepend\Source\AST\ASTComment

buildAstCompoundExpression() public méthode

Builds a new compound expression node.
Since: 0.9.6
public buildAstCompoundExpression ( ) : PDepend\Source\AST\ASTCompoundExpression
Résultat PDepend\Source\AST\ASTCompoundExpression

buildAstCompoundVariable() public méthode

Builds a new compound variable node.
Since: 0.9.6
public buildAstCompoundVariable ( string $image ) : PDepend\Source\AST\ASTCompoundVariable
$image string The source image for the compound variable.
Résultat PDepend\Source\AST\ASTCompoundVariable

buildAstConditionalExpression() public méthode

-------------- $bar = ($foo ? 42 : 23); --------------
Since: 0.9.8
public buildAstConditionalExpression ( ) : PDepend\Source\AST\ASTConditionalExpression
Résultat PDepend\Source\AST\ASTConditionalExpression

buildAstConstant() public méthode

Builds a new constant node.
Since: 0.9.6
public buildAstConstant ( string $image ) : PDepend\Source\AST\ASTConstant
$image string The source image for the constant.
Résultat PDepend\Source\AST\ASTConstant

buildAstConstantDeclarator() public méthode

class Foo { -------- const BAR = 42; -------- } Or in a comma separated constant defintion: class Foo { -------- const BAR = 42, -------- -------------- const BAZ = 'Foobar', -------------- ---------- const FOO = 3.14; ---------- }
Since: 0.9.6
public buildAstConstantDeclarator ( string $image ) : PDepend\Source\AST\ASTConstantDeclarator
$image string The source code image for this node.
Résultat PDepend\Source\AST\ASTConstantDeclarator

buildAstConstantDefinition() public méthode

class Foo { ------------------------ const FOO = 42, BAR = 23; ------------------------ }
Since: 0.9.6
public buildAstConstantDefinition ( string $image ) : PDepend\Source\AST\ASTConstantDefinition
$image string The source code image for this node.
Résultat PDepend\Source\AST\ASTConstantDefinition

buildAstConstantPostfix() public méthode

--- Foo::BAR; ---
Since: 0.9.6
public buildAstConstantPostfix ( string $image ) : PDepend\Source\AST\ASTConstantPostfix
$image string The image of this node.
Résultat PDepend\Source\AST\ASTConstantPostfix

buildAstContinueStatement() public méthode

Builds a new continue-statement node instance.
Since: 0.9.12
public buildAstContinueStatement ( string $image ) : PDepend\Source\AST\ASTContinueStatement
$image string The source code image for this node.
Résultat PDepend\Source\AST\ASTContinueStatement

buildAstDeclareStatement() public méthode

------------------------------- declare(encoding='ISO-8859-1'); ------------------------------- ------------------- declare(ticks=42) { ... } - ------------------ declare(ticks=42): ... enddeclare; -----------
Since: 0.10.0
public buildAstDeclareStatement ( ) : PDepend\Source\AST\ASTDeclareStatement
Résultat PDepend\Source\AST\ASTDeclareStatement

buildAstDoWhileStatement() public méthode

Builds a new do/while-statement node.
Since: 0.9.12
public buildAstDoWhileStatement ( string $image ) : PDepend\Source\AST\ASTDoWhileStatement
$image string The source image of this statement.
Résultat PDepend\Source\AST\ASTDoWhileStatement

buildAstEchoStatement() public méthode

Builds a new exit-statement instance.
Since: 0.9.12
public buildAstEchoStatement ( string $image ) : PDepend\Source\AST\ASTEchoStatement
$image string The source code image for this node.
Résultat PDepend\Source\AST\ASTEchoStatement

buildAstElseIfStatement() public méthode

Builds a new elseif statement node.
Since: 0.9.8
public buildAstElseIfStatement ( string $image ) : PDepend\Source\AST\ASTElseIfStatement
$image string The source image of this statement.
Résultat PDepend\Source\AST\ASTElseIfStatement

buildAstEvalExpression() public méthode

Builds a new eval-expression node.
Since: 0.9.12
public buildAstEvalExpression ( string $image ) : PDepend\Source\AST\ASTEvalExpression
$image string The source image of this expression.
Résultat PDepend\Source\AST\ASTEvalExpression

buildAstExitExpression() public méthode

Builds a new exit-expression instance.
Since: 0.9.12
public buildAstExitExpression ( string $image ) : PDepend\Source\AST\ASTExitExpression
$image string The source code image for this node.
Résultat PDepend\Source\AST\ASTExitExpression

buildAstExpression() public méthode

Builds a new expression node.
Since: 0.9.8
public buildAstExpression ( string $image = null ) : PDepend\Source\AST\ASTExpression
$image string
Résultat PDepend\Source\AST\ASTExpression

buildAstFieldDeclaration() public méthode

Builds a new field declaration node.
Since: 0.9.6
public buildAstFieldDeclaration ( ) : PDepend\Source\AST\ASTFieldDeclaration
Résultat PDepend\Source\AST\ASTFieldDeclaration

buildAstFinallyStatement() public méthode

Builds a new finally-statement node.
Since: 2.0.0
public buildAstFinallyStatement ( ) : PDepend\Source\AST\ASTFinallyStatement
Résultat PDepend\Source\AST\ASTFinallyStatement

buildAstForInit() public méthode

------------------------ for ($x = 0, $y = 23, $z = 42; $x < $y; ++$x) } ------------------------
Since: 0.9.8
public buildAstForInit ( ) : PDepend\Source\AST\ASTForInit
Résultat PDepend\Source\AST\ASTForInit

buildAstForStatement() public méthode

Builds a new for statement node.
Since: 0.9.8
public buildAstForStatement ( string $image ) : PDepend\Source\AST\ASTForStatement
$image string The source image of this statement.
Résultat PDepend\Source\AST\ASTForStatement

buildAstForUpdate() public méthode

------------------------------- for ($x = 0, $y = 23, $z = 42; $x < $y; ++$x, $y = $x + 1, $z = $x + 2) } -------------------------------
Since: 0.9.12
public buildAstForUpdate ( ) : PDepend\Source\AST\ASTForUpdate
Résultat PDepend\Source\AST\ASTForUpdate

buildAstForeachStatement() public méthode

Builds a new foreach-statement node.
Since: 0.9.8
public buildAstForeachStatement ( string $image ) : PDepend\Source\AST\ASTForeachStatement
$image string The source image of this statement.
Résultat PDepend\Source\AST\ASTForeachStatement

buildAstFormalParameter() public méthode

Builds a new formal parameter node.
Since: 0.9.6
public buildAstFormalParameter ( ) : PDepend\Source\AST\ASTFormalParameter
Résultat PDepend\Source\AST\ASTFormalParameter

buildAstFormalParameters() public méthode

Builds a new formal parameters node.
Since: 0.9.6
public buildAstFormalParameters ( ) : PDepend\Source\AST\ASTFormalParameters
Résultat PDepend\Source\AST\ASTFormalParameters

buildAstFunctionPostfix() public méthode

------- foo($bar); ------- -------- $foo($bar); --------
Since: 0.9.6
public buildAstFunctionPostfix ( string $image ) : PDepend\Source\AST\ASTFunctionPostfix
$image string The image of this node.
Résultat PDepend\Source\AST\ASTFunctionPostfix

buildAstGlobalStatement() public méthode

Builds a new global-statement instance.
Since: 0.9.12
public buildAstGlobalStatement ( ) : PDepend\Source\AST\ASTGlobalStatement
Résultat PDepend\Source\AST\ASTGlobalStatement

buildAstGotoStatement() public méthode

Builds a new goto-statement instance.
Since: 0.9.12
public buildAstGotoStatement ( string $image ) : PDepend\Source\AST\ASTGotoStatement
$image string The source code image for this node.
Résultat PDepend\Source\AST\ASTGotoStatement

buildAstHeredoc() public méthode

Builds a new heredoc node.
Since: 0.9.12
public buildAstHeredoc ( ) : PDepend\Source\AST\ASTHeredoc
Résultat PDepend\Source\AST\ASTHeredoc

buildAstIdentifier() public méthode

Builds a new identifier node.
Since: 0.9.6
public buildAstIdentifier ( string $image ) : PDepend\Source\AST\ASTIdentifier
$image string The image of this identifier.
Résultat PDepend\Source\AST\ASTIdentifier

buildAstIfStatement() public méthode

Builds a new if statement node.
Since: 0.9.8
public buildAstIfStatement ( string $image ) : PDepend\Source\AST\ASTIfStatement
$image string The source image of this statement.
Résultat PDepend\Source\AST\ASTIfStatement

buildAstIncludeExpression() public méthode

Builds a new include- or include_once-expression.
Since: 0.9.12
public buildAstIncludeExpression ( ) : PDepend\Source\AST\ASTIncludeExpression
Résultat PDepend\Source\AST\ASTIncludeExpression

buildAstInstanceOfExpression() public méthode

Builds a new instanceof expression node.
Since: 0.9.6
public buildAstInstanceOfExpression ( string $image ) : PDepend\Source\AST\ASTInstanceOfExpression
$image string The source image of this expression.
Résultat PDepend\Source\AST\ASTInstanceOfExpression

buildAstIssetExpression() public méthode

----------- if (isset($foo)) { ----------- } ----------------------- if (isset($foo, $bar, $baz)) { ----------------------- }
Since: 0.9.12
public buildAstIssetExpression ( ) : PDepend\Source\AST\ASTIssetExpression
Résultat PDepend\Source\AST\ASTIssetExpression

buildAstLabelStatement() public méthode

Builds a new label-statement instance.
Since: 0.9.12
public buildAstLabelStatement ( string $image ) : PDepend\Source\AST\ASTLabelStatement
$image string The source code image for this node.
Résultat PDepend\Source\AST\ASTLabelStatement

buildAstListExpression() public méthode

Builds a new list-expression node.
Since: 0.9.12
public buildAstListExpression ( string $image ) : PDepend\Source\AST\ASTListExpression
$image string The source image of this expression.
Résultat PDepend\Source\AST\ASTListExpression

buildAstLiteral() public méthode

Builds a new literal node.
Since: 0.9.6
public buildAstLiteral ( string $image ) : PDepend\Source\AST\ASTLiteral
$image string The source image for the literal node.
Résultat PDepend\Source\AST\ASTLiteral

buildAstLogicalAndExpression() public méthode

Builds a new logical and-expression.
Since: 0.9.8
public buildAstLogicalAndExpression ( ) : PDepend\Source\AST\ASTLogicalAndExpression
Résultat PDepend\Source\AST\ASTLogicalAndExpression

buildAstLogicalOrExpression() public méthode

Builds a new logical or-expression.
Since: 0.9.8
public buildAstLogicalOrExpression ( ) : PDepend\Source\AST\ASTLogicalOrExpression
Résultat PDepend\Source\AST\ASTLogicalOrExpression

buildAstLogicalXorExpression() public méthode

Builds a new logical xor-expression.
Since: 0.9.8
public buildAstLogicalXorExpression ( ) : PDepend\Source\AST\ASTLogicalXorExpression
Résultat PDepend\Source\AST\ASTLogicalXorExpression

buildAstMemberPrimaryPrefix() public méthode

-------- Foo::bar(); -------- --------- Foo::$bar(); --------- --------- $obj->bar(); --------- ---------- $obj->$bar(); ----------
Since: 0.9.6
public buildAstMemberPrimaryPrefix ( string $image ) : PDepend\Source\AST\ASTMemberPrimaryPrefix
$image string The source image of this expression.
Résultat PDepend\Source\AST\ASTMemberPrimaryPrefix

buildAstMethodPostfix() public méthode

--------- Foo::bar($baz); --------- ---------- Foo::$bar($baz); ----------
Since: 0.9.6
public buildAstMethodPostfix ( string $image ) : PDepend\Source\AST\ASTMethodPostfix
$image string The image of this node.
Résultat PDepend\Source\AST\ASTMethodPostfix

buildAstParentReference() public méthode

Builds a new parent reference instance.
Since: 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.
Résultat PDepend\Source\AST\ASTParentReference

buildAstPostfixExpression() public méthode

Builds a new postfix-expression node instance.
Since: 0.10.0
public buildAstPostfixExpression ( string $image ) : PDepend\Source\AST\ASTPostfixExpression
$image string The postfix-expression image/character.
Résultat PDepend\Source\AST\ASTPostfixExpression

buildAstPreDecrementExpression() public méthode

Builds a new pre-decrement-expression node instance.
Since: 0.10.0
public buildAstPreDecrementExpression ( ) : PDepend\Source\AST\ASTPreDecrementExpression
Résultat PDepend\Source\AST\ASTPreDecrementExpression

buildAstPreIncrementExpression() public méthode

Builds a new pre-increment-expression node instance.
Since: 0.10.0
public buildAstPreIncrementExpression ( ) : PDepend\Source\AST\ASTPreIncrementExpression
Résultat PDepend\Source\AST\ASTPreIncrementExpression

buildAstPrintExpression() public méthode

------------- print "qafoo"; -------------
Since: 2.3
public buildAstPrintExpression ( ) : PDepend\Source\AST\ASTConditionalExpression
Résultat PDepend\Source\AST\ASTConditionalExpression

buildAstPropertyPostfix() public méthode

---- Foo::$bar; ---- --- $object->bar; ---
Since: 0.9.6
public buildAstPropertyPostfix ( string $image ) : PDepend\Source\AST\ASTPropertyPostfix
$image string The image of this node.
Résultat PDepend\Source\AST\ASTPropertyPostfix

buildAstRequireExpression() public méthode

Builds a new require- or require_once-expression.
Since: 0.9.12
public buildAstRequireExpression ( ) : PDepend\Source\AST\ASTRequireExpression
Résultat PDepend\Source\AST\ASTRequireExpression

buildAstReturnStatement() public méthode

Builds a new return statement node instance.
Since: 0.9.12
public buildAstReturnStatement ( string $image ) : PDepend\Source\AST\ASTReturnStatement
$image string The source code image for this node.
Résultat PDepend\Source\AST\ASTReturnStatement

buildAstScalarType() public méthode

Builds a new primitive type node.
Since: 0.9.6
public buildAstScalarType ( string $image ) : PDepend\Source\AST\ASTScalarType
$image string The source image for the primitive type.
Résultat PDepend\Source\AST\ASTScalarType

buildAstScope() public méthode

Builds a new function/method scope instance.
Since: 0.9.12
public buildAstScope ( ) : PDepend\Source\AST\ASTScope
Résultat PDepend\Source\AST\ASTScope

buildAstScopeStatement() public méthode

Builds a new scope-statement instance.
Since: 0.9.12
public buildAstScopeStatement ( ) : PDepend\Source\AST\ASTScopeStatement
Résultat PDepend\Source\AST\ASTScopeStatement

buildAstSelfReference() public méthode

Builds a new self reference instance.
Since: 0.9.6
public buildAstSelfReference ( PDepend\Source\AST\AbstractASTClassOrInterface $type ) : PDepend\Source\AST\ASTSelfReference
$type PDepend\Source\AST\AbstractASTClassOrInterface
Résultat PDepend\Source\AST\ASTSelfReference

buildAstShiftLeftExpression() public méthode

Build a new shift left expression.
Since: 1.0.1
public buildAstShiftLeftExpression ( ) : PDepend\Source\AST\ASTShiftLeftExpression
Résultat PDepend\Source\AST\ASTShiftLeftExpression

buildAstShiftRightExpression() public méthode

Build a new shift right expression.
Since: 1.0.1
public buildAstShiftRightExpression ( ) : PDepend\Source\AST\ASTShiftRightExpression
Résultat PDepend\Source\AST\ASTShiftRightExpression

buildAstStatement() public méthode

Builds a new statement instance.
Since: 0.9.12
public buildAstStatement ( ) : PDepend\Source\AST\ASTStatement
Résultat PDepend\Source\AST\ASTStatement

buildAstStaticReference() public méthode

Builds a new static reference instance.
Since: 0.9.6
public buildAstStaticReference ( PDepend\Source\AST\AbstractASTClassOrInterface $owner ) : PDepend\Source\AST\ASTStaticReference
$owner PDepend\Source\AST\AbstractASTClassOrInterface
Résultat PDepend\Source\AST\ASTStaticReference

buildAstStaticVariableDeclaration() public méthode

Builds a new static variable declaration node.
Since: 0.9.6
public buildAstStaticVariableDeclaration ( string $image ) : PDepend\Source\AST\ASTStaticVariableDeclaration
$image string The source image for the statuc declaration.
Résultat PDepend\Source\AST\ASTStaticVariableDeclaration

buildAstString() public méthode

$string = "Manuel $Pichler <{$email}>"; \PDepend\Source\AST\ASTString |-- ASTLiteral - "Manuel ") |-- ASTVariable - $Pichler |-- ASTLiteral - " <" |-- ASTCompoundExpression - {...} | |-- ASTVariable - $email |-- ASTLiteral - ">"
Since: 0.9.10
public buildAstString ( ) : PDepend\Source\AST\ASTString
Résultat PDepend\Source\AST\ASTString

buildAstStringIndexExpression() public méthode

-------- $string{$index} --------
Since: 0.9.12
public buildAstStringIndexExpression ( ) : PDepend\Source\AST\ASTStringIndexExpression
Résultat PDepend\Source\AST\ASTStringIndexExpression

buildAstSwitchLabel() public méthode

Builds a new switch-label node.
Since: 0.9.8
public buildAstSwitchLabel ( string $image ) : PDepend\Source\AST\ASTSwitchLabel
$image string The source image of this label.
Résultat PDepend\Source\AST\ASTSwitchLabel

buildAstSwitchStatement() public méthode

Builds a new switch-statement-node.
Since: 0.9.8
public buildAstSwitchStatement ( ) : PDepend\Source\AST\ASTSwitchStatement
Résultat PDepend\Source\AST\ASTSwitchStatement

buildAstThrowStatement() public méthode

Builds a new throw-statement instance.
Since: 0.9.12
public buildAstThrowStatement ( string $image ) : PDepend\Source\AST\ASTThrowStatement
$image string The source code image for this node.
Résultat PDepend\Source\AST\ASTThrowStatement

buildAstTraitAdaptation() public méthode

Builds a new trait adaptation scope
Since: 1.0.0
public buildAstTraitAdaptation ( ) : PDepend\Source\AST\ASTTraitAdaptation
Résultat PDepend\Source\AST\ASTTraitAdaptation

buildAstTraitAdaptationAlias() public méthode

Builds a new trait adaptation alias statement.
Since: 1.0.0
public buildAstTraitAdaptationAlias ( string $image ) : PDepend\Source\AST\ASTTraitAdaptationAlias
$image string The trait method name.
Résultat PDepend\Source\AST\ASTTraitAdaptationAlias

buildAstTraitAdaptationPrecedence() public méthode

Builds a new trait adaptation precedence statement.
Since: 1.0.0
public buildAstTraitAdaptationPrecedence ( string $image ) : PDepend\Source\AST\ASTTraitAdaptationPrecedence
$image string The trait method name.
Résultat PDepend\Source\AST\ASTTraitAdaptationPrecedence

buildAstTraitReference() public méthode

Builds a new trait reference node.
Since: 1.0.0
public buildAstTraitReference ( string $qualifiedName ) : PDepend\Source\AST\ASTTraitReference
$qualifiedName string The full qualified trait name.
Résultat PDepend\Source\AST\ASTTraitReference

buildAstTraitUseStatement() public méthode

Builds a new trait use-statement node.
Since: 1.0.0
public buildAstTraitUseStatement ( ) : PDepend\Source\AST\ASTTraitUseStatement
Résultat PDepend\Source\AST\ASTTraitUseStatement

buildAstTryStatement() public méthode

Builds a new try-statement instance.
Since: 0.9.12
public buildAstTryStatement ( string $image ) : PDepend\Source\AST\ASTTryStatement
$image string The source code image for this node.
Résultat PDepend\Source\AST\ASTTryStatement

buildAstTypeArray() public méthode

Builds a new array type node.
Since: 0.9.6
public buildAstTypeArray ( ) : PDepend\Source\AST\ASTTypeArray
Résultat PDepend\Source\AST\ASTTypeArray

buildAstTypeCallable() public méthode

Builds a new node for the callable type.
Since: 1.0.0
public buildAstTypeCallable ( ) : PDepend\Source\AST\ASTTypeCallable
Résultat PDepend\Source\AST\ASTTypeCallable

buildAstUnaryExpression() public méthode

Builds a new unary expression node instance.
Since: 0.9.11
public buildAstUnaryExpression ( string $image ) : PDepend\Source\AST\ASTUnaryExpression
$image string The unary expression image/character.
Résultat PDepend\Source\AST\ASTUnaryExpression

buildAstUnsetStatement() public méthode

Builds a new unset-statement instance.
Since: 0.9.12
public buildAstUnsetStatement ( ) : PDepend\Source\AST\ASTUnsetStatement
Résultat PDepend\Source\AST\ASTUnsetStatement

buildAstVariable() public méthode

Builds a new variable node.
Since: 0.9.6
public buildAstVariable ( string $image ) : PDepend\Source\AST\ASTVariable
$image string The source image for the variable.
Résultat PDepend\Source\AST\ASTVariable

buildAstVariableDeclarator() public méthode

Builds a new variable declarator node.
Since: 0.9.6
public buildAstVariableDeclarator ( string $image ) : PDepend\Source\AST\ASTVariableDeclarator
$image string The source image for the variable declarator.
Résultat PDepend\Source\AST\ASTVariableDeclarator

buildAstVariableVariable() public méthode

Builds a new variable variable node.
Since: 0.9.6
public buildAstVariableVariable ( string $image ) : PDepend\Source\AST\ASTVariableVariable
$image string The source image for the variable variable.
Résultat PDepend\Source\AST\ASTVariableVariable

buildAstWhileStatement() public méthode

Builds a new while-statement node.
Since: 0.9.8
public buildAstWhileStatement ( string $image ) : PDepend\Source\AST\ASTWhileStatement
$image string The source image of this statement.
Résultat PDepend\Source\AST\ASTWhileStatement

buildAstYieldStatement() public méthode

Builds a new yield-statement instance.
public buildAstYieldStatement ( string $image ) : PDepend\Source\AST\ASTYieldStatement
$image string The source code image for this node.
Résultat PDepend\Source\AST\ASTYieldStatement

buildClass() public méthode

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.
Résultat PDepend\Source\AST\ASTClass The created class object.

buildClassInternal() protected méthode

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.
Since: 0.9.5
protected buildClassInternal ( string $qualifiedName ) : PDepend\Source\AST\ASTClass
$qualifiedName string
Résultat PDepend\Source\AST\ASTClass

buildFunction() public méthode

Builds a new function instance.
public buildFunction ( string $name ) : PDepend\Source\AST\ASTFunction
$name string The function name.
Résultat PDepend\Source\AST\ASTFunction

buildInterface() public méthode

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.
Résultat PDepend\Source\AST\ASTInterface

buildInterfaceInternal() protected méthode

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.
Since: 0.9.5
protected buildInterfaceInternal ( string $qualifiedName ) : PDepend\Source\AST\ASTInterface
$qualifiedName string
Résultat PDepend\Source\AST\ASTInterface

buildMethod() public méthode

Builds a new method instance.
public buildMethod ( string $name ) : PDepend\Source\AST\ASTMethod
$name string
Résultat PDepend\Source\AST\ASTMethod

buildNamespace() public méthode

Builds a new package instance.
public buildNamespace ( string $name ) : PDepend\Source\AST\ASTNamespace
$name string The package name.
Résultat PDepend\Source\AST\ASTNamespace

buildTrait() public méthode

Builds a new php trait instance.
Since: 1.0.0
public buildTrait ( string $qualifiedName ) : PDepend\Source\AST\ASTTrait
$qualifiedName string The full qualified trait name.
Résultat PDepend\Source\AST\ASTTrait

buildTraitInternal() protected méthode

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.
Since: 0.9.5
protected buildTraitInternal ( string $qualifiedName ) : PDepend\Source\AST\ASTTrait
$qualifiedName string
Résultat PDepend\Source\AST\ASTTrait

checkBuilderState() protected méthode

Checks that the parser is not frozen or a request is flagged as internal.
Since: 0.9.5
protected checkBuilderState ( boolean $internal = false ) : void
$internal boolean The new internal flag value.
Résultat void

extractNamespaceName() protected méthode

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.
Résultat string

extractTypeName() protected méthode

$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.
Résultat string

findClass() protected méthode

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.
Since: 0.9.5
protected findClass ( string $qualifiedName ) : PDepend\Source\AST\ASTClass
$qualifiedName string
Résultat PDepend\Source\AST\ASTClass

findInterface() protected méthode

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.
Since: 0.9.5
protected findInterface ( string $qualifiedName ) : PDepend\Source\AST\ASTInterface
$qualifiedName string
Résultat PDepend\Source\AST\ASTInterface

findTrait() protected méthode

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.
Since: 0.9.5
protected findTrait ( string $qualifiedName ) : PDepend\Source\AST\ASTTrait
$qualifiedName string
Résultat PDepend\Source\AST\ASTTrait

findType() protected méthode

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.
Since: 0.9.5
protected findType ( array $instances, string $qualifiedName ) : AbstractASTType
$instances array
$qualifiedName string
Résultat PDepend\Source\AST\AbstractASTType

freeze() protected méthode

This method will freeze the actual builder state and create a second runtime scope.
Since: 0.9.5
protected freeze ( ) : void
Résultat void

getClass() public méthode

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.
Since: 0.9.5
public getClass ( string $qualifiedName ) : PDepend\Source\AST\ASTClass
$qualifiedName string The full qualified type identifier.
Résultat PDepend\Source\AST\ASTClass

getClassOrInterface() public méthode

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.
Since: 0.9.5
public getClassOrInterface ( string $qualifiedName ) : PDepend\Source\AST\AbstractASTClassOrInterface
$qualifiedName string
Résultat PDepend\Source\AST\AbstractASTClassOrInterface

getInterface() public méthode

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.
Since: 0.9.5
public getInterface ( string $qualifiedName ) : PDepend\Source\AST\ASTInterface
$qualifiedName string
Résultat PDepend\Source\AST\ASTInterface

getIterator() public méthode

Returns an iterator with all generated {@link \PDepend\Source\AST\ASTNamespace} objects.
public getIterator ( ) : PDepend\Source\AST\ASTArtifactList
Résultat PDepend\Source\AST\ASTArtifactList

getNamespaces() public méthode

Returns an iterator with all generated {@link \PDepend\Source\AST\ASTNamespace} objects.
public getNamespaces ( ) : PDepend\Source\AST\ASTNamespace[]
Résultat PDepend\Source\AST\ASTNamespace[]

getTrait() public méthode

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.
Since: 1.0.0
public getTrait ( string $qualifiedName ) : PDepend\Source\AST\ASTTrait
$qualifiedName string
Résultat PDepend\Source\AST\ASTTrait

isDefault() protected méthode

Returns true if the given package is the default package.
protected isDefault ( string $namespaceName ) : boolean
$namespaceName string The package name.
Résultat boolean

restoreClass() public méthode

Restores a class within the internal type scope.
Since: 0.10.0
public restoreClass ( PDepend\Source\AST\ASTClass $class ) : void
$class PDepend\Source\AST\ASTClass
Résultat void

restoreFunction() public méthode

Restores a function within the internal type scope.
Since: 0.10.0
public restoreFunction ( PDepend\Source\AST\ASTFunction $function ) : void
$function PDepend\Source\AST\ASTFunction
Résultat void

restoreInterface() public méthode

Restores an interface within the internal type scope.
Since: 0.10.0
public restoreInterface ( PDepend\Source\AST\ASTInterface $interface ) : void
$interface PDepend\Source\AST\ASTInterface
Résultat void

restoreTrait() public méthode

Restores a trait within the internal type scope.
Since: 0.10.0
public restoreTrait ( PDepend\Source\AST\ASTTrait $trait ) : void
$trait PDepend\Source\AST\ASTTrait
Résultat void

setCache() public méthode

Setter method for the currently used token cache.
Since: 0.10.0
public setCache ( PDepend\Util\Cache\CacheDriver $cache ) : PHPBuilder
$cache PDepend\Util\Cache\CacheDriver
Résultat PHPBuilder

storeClass() protected méthode

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
Résultat void

storeInterface() protected méthode

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
Résultat void

storeTrait() protected méthode

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
Résultat void

Property Details

$cache protected_oe property

The internal used cache instance.
Since: 0.10.0
protected CacheDriver,PDepend\Util\Cache $cache
Résultat PDepend\Util\Cache\CacheDriver

$context protected_oe property

The ast builder context.
Since: 0.10.0
protected BuilderContext,PDepend\Source\Builder $context
Résultat PDepend\Source\Builder\BuilderContext

$defaultCompilationUnit protected_oe property

Default source file that acts as a dummy.
protected ASTCompilationUnit,PDepend\Source\AST $defaultCompilationUnit
Résultat PDepend\Source\AST\ASTCompilationUnit

$defaultPackage protected_oe property

Default package which contains all functions and classes with an unknown scope.
protected ASTNamespace,PDepend\Source\AST $defaultPackage
Résultat PDepend\Source\AST\ASTNamespace