Property | Type | Description | |
---|---|---|---|
$cache | PDepend\Util\Cache\CacheDriver | The internal used cache instance. | |
$constants | array(string=>mixed) | An array with all constants defined in this class or interface. | |
$context | PDepend\Source\Builder\BuilderContext | The currently used builder context. | |
$methods | PDepend\Source\AST\ASTMethod[] | Temporary property that only holds methods during the parsing process. | |
$modifiers | integer | The modifiers for this class instance. | |
$namespaceName | string | Name of the parent namespace for this class or interface instance. Or NULL when no namespace was specified. | |
$nodes | PDepend\Source\AST\ASTNode[] | List of all parsed child nodes. | |
$userDefined | boolean | The parser marks all classes and interfaces as user defined that have a source file and were part of parsing process. |
Method | Description | |
---|---|---|
__sleep ( ) : array | The magic sleep method is called by the PHP runtime environment before an instance of this class gets serialized. It returns an array with the names of all those properties that should be cached for this class or interface instance. | |
__wakeup ( ) : void | The magic wakeup method is called by the PHP runtime environment when a serialized instance of this class gets unserialized and all properties are restored. This implementation of the __wakeup() method sets a flag that this object was restored from the cache and it restores the dependency between this class or interface and it's child methods. | |
addChild ( PDepend\Source\AST\ASTNode $node ) : void | Adds a parsed child node to this node. | |
addMethod ( PDepend\Source\AST\ASTMethod $method ) : PDepend\Source\AST\ASTMethod | Adds the given method to this type. | |
findChildrenOfType ( string $targetType, array &$results = [] ) : PDepend\Source\AST\ASTNode[] | Will find all children for the given type. | |
getAllMethods ( ) : PDepend\Source\AST\ASTMethod[] | Returns a list of all methods provided by this type or one of its parents. | |
getChild ( integer $index ) : PDepend\Source\AST\ASTNode | Returns the child at the given index. | |
getChildren ( ) : PDepend\Source\AST\ASTNode[] | Returns all child nodes of this class. | |
getFirstChildOfType ( string $targetType ) : PDepend\Source\AST\ASTNode | This method will search recursive for the first child node that is an instance of the given $targetType. The returned value will be null if no child exists for that. | |
getMethods ( ) : PDepend\Source\AST\ASTMethod[] | Returns all {@link \PDepend\Source\AST\ASTMethod} objects in this type. | |
getNamespace ( ) : PDepend\Source\AST\ASTNamespace | Returns the parent namespace for this class. | |
getNamespaceName ( ) : string | Returns the name of the parent namespace. | |
getTokens ( ) : PDepend\Source\Tokenizer\Token[] | Returns an array with all tokens within this type. | |
isCached ( ) : boolean | This method will return true when this class or interface instance was restored from the cache and not currently parsed. Otherwise this method will return false. | |
isSubtypeOf ( |
Checks that this user type is a subtype of the given $type instance. | |
isUserDefined ( ) : boolean | This method will return true when this type has a declaration in the analyzed source files. | |
setCache ( PDepend\Util\Cache\CacheDriver $cache ) : |
Setter method for the currently used token cache, where this class or interface instance can store the associated tokens. | |
setContext ( PDepend\Source\Builder\BuilderContext $context ) : |
Sets the currently active builder context. | |
setNamespace ( PDepend\Source\AST\ASTNamespace $namespace ) : void | Sets the parent namespace for this type. | |
setTokens ( array $tokens ) : void | Sets the tokens for this type. | |
setUserDefined ( ) : void | This method can be used to mark a type as user defined. User defined means that the type has a valid declaration in the analyzed source files. | |
unsetNamespace ( ) : void | Resets the associated namespace reference. |
Method | Description | |
---|---|---|
getTraitMethods ( ) : PDepend\Source\AST\ASTMethod[] | Returns an array with {@link \PDepend\Source\AST\ASTMethod} objects that are imported through traits. |
public addMethod ( PDepend\Source\AST\ASTMethod $method ) : PDepend\Source\AST\ASTMethod | ||
$method | PDepend\Source\AST\ASTMethod | |
return | PDepend\Source\AST\ASTMethod |
public findChildrenOfType ( string $targetType, array &$results = [] ) : PDepend\Source\AST\ASTNode[] | ||
$targetType | string | The target class or interface type. |
$results | array | |
return | PDepend\Source\AST\ASTNode[] |
abstract public getAllMethods ( ) : PDepend\Source\AST\ASTMethod[] | ||
return | PDepend\Source\AST\ASTMethod[] |
public getChildren ( ) : PDepend\Source\AST\ASTNode[] | ||
return | PDepend\Source\AST\ASTNode[] |
public getFirstChildOfType ( string $targetType ) : PDepend\Source\AST\ASTNode | ||
$targetType | string | Searched class or interface type. |
return | PDepend\Source\AST\ASTNode |
public getMethods ( ) : PDepend\Source\AST\ASTMethod[] | ||
return | PDepend\Source\AST\ASTMethod[] |
public getNamespace ( ) : PDepend\Source\AST\ASTNamespace | ||
return | PDepend\Source\AST\ASTNamespace |
public getNamespaceName ( ) : string | ||
return | string |
public getTokens ( ) : PDepend\Source\Tokenizer\Token[] | ||
return | PDepend\Source\Tokenizer\Token[] |
protected getTraitMethods ( ) : PDepend\Source\AST\ASTMethod[] | ||
return | PDepend\Source\AST\ASTMethod[] |
abstract public isSubtypeOf ( |
||
$type | ||
return | boolean |
public isUserDefined ( ) : boolean | ||
return | boolean |
public setCache ( PDepend\Util\Cache\CacheDriver $cache ) : |
||
$cache | PDepend\Util\Cache\CacheDriver | |
return |
public setContext ( PDepend\Source\Builder\BuilderContext $context ) : |
||
$context | PDepend\Source\Builder\BuilderContext | |
return |
public setNamespace ( PDepend\Source\AST\ASTNamespace $namespace ) : void | ||
$namespace | PDepend\Source\AST\ASTNamespace | |
return | void |
public setUserDefined ( ) : void | ||
return | void |
public unsetNamespace ( ) : void | ||
return | void |
protected CacheDriver,PDepend\Util\Cache $cache | ||
return | PDepend\Util\Cache\CacheDriver |
protected array(string=>mixed) $constants | ||
return | array(string=>mixed) |
protected BuilderContext,PDepend\Source\Builder $context | ||
return | PDepend\Source\Builder\BuilderContext |
protected ASTMethod[],PDepend\Source\AST $methods | ||
return | PDepend\Source\AST\ASTMethod[] |
protected int $modifiers | ||
return | integer |
protected string $namespaceName | ||
return | string |
protected ASTNode[],PDepend\Source\AST $nodes | ||
return | PDepend\Source\AST\ASTNode[] |
protected bool $userDefined | ||
return | boolean |