Method |
Description |
|
__construct ( string $fileName ) |
Constructs a new source file instance. |
|
__sleep ( ) : array(string) |
The magic sleep method will be called by PHP's runtime environment right
before it serializes an instance of this class. This method returns an
array with those property names that should be serialized. |
|
__toString ( ) : string |
Returns the string representation of this class. |
|
__wakeup ( ) : void |
The magic wakeup method will is called by PHP's runtime environment when
a serialized instance of this class was unserialized. This implementation
of the wakeup method restores the references between all parsed entities
in this source file and this file instance. |
|
accept ( PDepend\Source\ASTVisitor\ASTVisitor $visitor ) : void |
ASTVisitor method for node tree traversal. |
|
addChild ( PDepend\Source\AST\AbstractASTArtifact $artifact ) : void |
Adds a source item that was parsed from this source file. |
|
free ( ) : void |
This method can be called by the PDepend runtime environment or a
utilizing component to free up memory. This methods are required for
PHP version < 5.3 where cyclic references can not be resolved
automatically by PHP's garbage collector. |
|
getEndLine ( ) : integer |
Returns the start line number for this source file. For an existing file
this value must always be greater 0, while it can be 0
for a not existing dummy file. |
|
getFileName ( ) : string |
Returns the physical file name for this object. |
|
getId ( ) : string |
Returns a id for this code node. |
|
getName ( ) : string |
Returns the physical file name for this object. |
|
getSource ( ) : array(integer=>string) |
Returns normalized source code with stripped whitespaces. |
|
getStartLine ( ) : integer |
Returns the start line number for this source file. For an existing file
this value must always be 1, while it can be 0 for a
not existing dummy file. |
|
getTokens ( ) : array(array) |
Returns an array with all tokens within this file. |
|
isCached ( ) : boolean |
This method will return true when this file instance was restored
from the cache and not currently parsed. Otherwise this method will return
false. |
|
setCache ( PDepend\Util\Cache\CacheDriver $cache ) : ASTCompilationUnit |
Setter method for the used parser and token cache. |
|
setId ( string $id ) : void |
Sets the unique identifier for this file instance. |
|
setTokens ( array $tokens ) : void |
Sets the tokens for this file. |
|