PHP Class PDepend\Source\Language\PHP\PHPBuilder

Inheritance: implements PDepend\Source\Builder\Builder
Mostrar archivo Open project: pdepend/pdepend Class Usage Examples

Protected Properties

Property 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.

Public Methods

Method 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.

Protected Methods

Method 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

Method 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 method

Constructs a new builder instance.
public __construct ( )

buildAnonymousClass() public method

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

buildAstAllocationExpression() public method

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.
return PDepend\Source\AST\ASTAllocationExpression

buildAstArguments() public method

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

buildAstArray() public method

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

buildAstArrayElement() public method

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

buildAstArrayIndexExpression() public method

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

buildAstAssignmentExpression() public method

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

buildAstBooleanAndExpression() public method

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

buildAstBooleanOrExpression() public method

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

buildAstBreakStatement() public method

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.
return PDepend\Source\AST\ASTBreakStatement

buildAstCastExpression() public method

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.
return PDepend\Source\AST\ASTCastExpression

buildAstCatchStatement() public method

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

buildAstClassFqnPostfix() public method

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

buildAstClassOrInterfaceReference() public method

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.
return PDepend\Source\AST\ASTClassOrInterfaceReference

buildAstClassReference() public method

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.
return PDepend\Source\AST\ASTClassReference

buildAstCloneExpression() public method

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.
return PDepend\Source\AST\ASTCloneExpression

buildAstClosure() public method

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

buildAstComment() public method

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

buildAstCompoundExpression() public method

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

buildAstCompoundVariable() public method

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.
return PDepend\Source\AST\ASTCompoundVariable

buildAstConditionalExpression() public method

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

buildAstConstant() public method

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.
return PDepend\Source\AST\ASTConstant

buildAstConstantDeclarator() public method

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.
return PDepend\Source\AST\ASTConstantDeclarator

buildAstConstantDefinition() public method

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.
return PDepend\Source\AST\ASTConstantDefinition

buildAstConstantPostfix() public method

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

buildAstContinueStatement() public method

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.
return PDepend\Source\AST\ASTContinueStatement

buildAstDeclareStatement() public method

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

buildAstDoWhileStatement() public method

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.
return PDepend\Source\AST\ASTDoWhileStatement

buildAstEchoStatement() public method

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.
return PDepend\Source\AST\ASTEchoStatement

buildAstElseIfStatement() public method

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.
return PDepend\Source\AST\ASTElseIfStatement

buildAstEvalExpression() public method

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.
return PDepend\Source\AST\ASTEvalExpression

buildAstExitExpression() public method

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.
return PDepend\Source\AST\ASTExitExpression

buildAstExpression() public method

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

buildAstFieldDeclaration() public method

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

buildAstFinallyStatement() public method

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

buildAstForInit() public method

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

buildAstForStatement() public method

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.
return PDepend\Source\AST\ASTForStatement

buildAstForUpdate() public method

------------------------------- 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
return PDepend\Source\AST\ASTForUpdate

buildAstForeachStatement() public method

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.
return PDepend\Source\AST\ASTForeachStatement

buildAstFormalParameter() public method

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

buildAstFormalParameters() public method

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

buildAstFunctionPostfix() public method

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

buildAstGlobalStatement() public method

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

buildAstGotoStatement() public method

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.
return PDepend\Source\AST\ASTGotoStatement

buildAstHeredoc() public method

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

buildAstIdentifier() public method

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

buildAstIfStatement() public method

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.
return PDepend\Source\AST\ASTIfStatement

buildAstIncludeExpression() public method

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

buildAstInstanceOfExpression() public method

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.
return PDepend\Source\AST\ASTInstanceOfExpression

buildAstIssetExpression() public method

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

buildAstLabelStatement() public method

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.
return PDepend\Source\AST\ASTLabelStatement

buildAstListExpression() public method

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.
return PDepend\Source\AST\ASTListExpression

buildAstLiteral() public method

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.
return PDepend\Source\AST\ASTLiteral

buildAstLogicalAndExpression() public method

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

buildAstLogicalOrExpression() public method

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

buildAstLogicalXorExpression() public method

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

buildAstMemberPrimaryPrefix() public method

-------- 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.
return PDepend\Source\AST\ASTMemberPrimaryPrefix

buildAstMethodPostfix() public method

--------- 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.
return PDepend\Source\AST\ASTMethodPostfix

buildAstParentReference() public method

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.
return PDepend\Source\AST\ASTParentReference

buildAstPostfixExpression() public method

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.
return PDepend\Source\AST\ASTPostfixExpression

buildAstPreDecrementExpression() public method

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

buildAstPreIncrementExpression() public method

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

buildAstPrintExpression() public method

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

buildAstPropertyPostfix() public method

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

buildAstRequireExpression() public method

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

buildAstReturnStatement() public method

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.
return PDepend\Source\AST\ASTReturnStatement

buildAstScalarType() public method

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.
return PDepend\Source\AST\ASTScalarType

buildAstScope() public method

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

buildAstScopeStatement() public method

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

buildAstSelfReference() public method

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
return PDepend\Source\AST\ASTSelfReference

buildAstShiftLeftExpression() public method

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

buildAstShiftRightExpression() public method

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

buildAstStatement() public method

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

buildAstStaticReference() public method

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
return PDepend\Source\AST\ASTStaticReference

buildAstStaticVariableDeclaration() public method

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.
return PDepend\Source\AST\ASTStaticVariableDeclaration

buildAstString() public method

$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
return PDepend\Source\AST\ASTString

buildAstStringIndexExpression() public method

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

buildAstSwitchLabel() public method

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.
return PDepend\Source\AST\ASTSwitchLabel

buildAstSwitchStatement() public method

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

buildAstThrowStatement() public method

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.
return PDepend\Source\AST\ASTThrowStatement

buildAstTraitAdaptation() public method

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

buildAstTraitAdaptationAlias() public method

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.
return PDepend\Source\AST\ASTTraitAdaptationAlias

buildAstTraitAdaptationPrecedence() public method

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.
return PDepend\Source\AST\ASTTraitAdaptationPrecedence

buildAstTraitReference() public method

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.
return PDepend\Source\AST\ASTTraitReference

buildAstTraitUseStatement() public method

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

buildAstTryStatement() public method

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.
return PDepend\Source\AST\ASTTryStatement

buildAstTypeArray() public method

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

buildAstTypeCallable() public method

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

buildAstUnaryExpression() public method

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.
return PDepend\Source\AST\ASTUnaryExpression

buildAstUnsetStatement() public method

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

buildAstVariable() public method

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.
return PDepend\Source\AST\ASTVariable

buildAstVariableDeclarator() public method

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.
return PDepend\Source\AST\ASTVariableDeclarator

buildAstVariableVariable() public method

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.
return PDepend\Source\AST\ASTVariableVariable

buildAstWhileStatement() public method

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.
return PDepend\Source\AST\ASTWhileStatement

buildAstYieldStatement() public method

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

buildClass() public method

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

buildClassInternal() protected method

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
return PDepend\Source\AST\ASTClass

buildFunction() public method

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

buildInterface() public method

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.
return PDepend\Source\AST\ASTInterface

buildInterfaceInternal() protected method

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
return PDepend\Source\AST\ASTInterface

buildMethod() public method

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

buildNamespace() public method

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

buildTrait() public method

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.
return PDepend\Source\AST\ASTTrait

buildTraitInternal() protected method

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
return PDepend\Source\AST\ASTTrait

checkBuilderState() protected method

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.
return void

extractNamespaceName() protected method

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.
return string

extractTypeName() protected method

$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.
return string

findClass() protected method

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
return PDepend\Source\AST\ASTClass

findInterface() protected method

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
return PDepend\Source\AST\ASTInterface

findTrait() protected method

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
return PDepend\Source\AST\ASTTrait

findType() protected method

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
return PDepend\Source\AST\AbstractASTType

freeze() protected method

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

getClass() public method

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.
return PDepend\Source\AST\ASTClass

getClassOrInterface() public method

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
return PDepend\Source\AST\AbstractASTClassOrInterface

getInterface() public method

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
return PDepend\Source\AST\ASTInterface

getIterator() public method

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

getNamespaces() public method

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

getTrait() public method

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
return PDepend\Source\AST\ASTTrait

isDefault() protected method

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

restoreClass() public method

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
return void

restoreFunction() public method

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
return void

restoreInterface() public method

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
return void

restoreTrait() public method

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
return void

setCache() public method

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
return PHPBuilder

storeClass() protected method

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
return void

storeInterface() protected method

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
return void

storeTrait() protected method

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
return void

Property Details

$cache protected_oe property

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

$context protected_oe property

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

$defaultCompilationUnit protected_oe property

Default source file that acts as a dummy.
protected ASTCompilationUnit,PDepend\Source\AST $defaultCompilationUnit
return 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
return PDepend\Source\AST\ASTNamespace