PHP 클래스 PDepend\Source\AST\ASTCompilationUnit

상속: extends PDepend\Source\AST\AbstractASTArtifact
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$cache PDepend\Util\Cache\CacheDriver The internal used cache instance.
$cached boolean Was this file instance restored from the cache?
$childNodes PDepend\Source\AST\AbstractASTArtifact[] List of classes, interfaces and functions that parsed from this file.
$comment string The comment for this type.
$endLine integer The files end line.
$fileName string The source file name/path.
$id string The unique identifier for this function.
$startLine integer The files start line. This property must always have the value 1.

공개 메소드들

메소드 설명
__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.

보호된 메소드들

메소드 설명
readSource ( ) : void Reads the source file if required.

메소드 상세

__construct() 공개 메소드

Constructs a new source file instance.
public __construct ( string $fileName )
$fileName string The source file name/path.

__sleep() 공개 메소드

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.
부터: 0.10.0
public __sleep ( ) : array(string)
리턴 array(string)

__toString() 공개 메소드

Returns the string representation of this class.
public __toString ( ) : string
리턴 string

__wakeup() 공개 메소드

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.
또한 보기: PDepend\Source\AST\ASTCompilationUnit::$childNodes
부터: 0.10.0
public __wakeup ( ) : void
리턴 void

accept() 공개 메소드

ASTVisitor method for node tree traversal.
public accept ( PDepend\Source\ASTVisitor\ASTVisitor $visitor ) : void
$visitor PDepend\Source\ASTVisitor\ASTVisitor
리턴 void

addChild() 공개 메소드

Adds a source item that was parsed from this source file.
부터: 0.10.0
public addChild ( PDepend\Source\AST\AbstractASTArtifact $artifact ) : void
$artifact PDepend\Source\AST\AbstractASTArtifact
리턴 void

free() 공개 메소드

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.
사용 중단: Since 0.10.0
부터: 0.9.12
public free ( ) : void
리턴 void

getEndLine() 공개 메소드

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.
부터: 0.10.0
public getEndLine ( ) : integer
리턴 integer

getFileName() 공개 메소드

Returns the physical file name for this object.
public getFileName ( ) : string
리턴 string

getId() 공개 메소드

Returns a id for this code node.
public getId ( ) : string
리턴 string

getName() 공개 메소드

Returns the physical file name for this object.
public getName ( ) : string
리턴 string

getSource() 공개 메소드

Returns normalized source code with stripped whitespaces.
public getSource ( ) : array(integer=>string)
리턴 array(integer=>string)

getStartLine() 공개 메소드

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.
부터: 0.10.0
public getStartLine ( ) : integer
리턴 integer

getTokens() 공개 메소드

Returns an array with all tokens within this file.
public getTokens ( ) : array(array)
리턴 array(array)

isCached() 공개 메소드

This method will return true when this file instance was restored from the cache and not currently parsed. Otherwise this method will return false.
부터: 0.10.0
public isCached ( ) : boolean
리턴 boolean

readSource() 보호된 메소드

Reads the source file if required.
protected readSource ( ) : void
리턴 void

setCache() 공개 메소드

Setter method for the used parser and token cache.
부터: 0.10.0
public setCache ( PDepend\Util\Cache\CacheDriver $cache ) : ASTCompilationUnit
$cache PDepend\Util\Cache\CacheDriver
리턴 ASTCompilationUnit

setId() 공개 메소드

Sets the unique identifier for this file instance.
부터: 0.9.12
public setId ( string $id ) : void
$id string Identifier for this file.
리턴 void

setTokens() 공개 메소드

Sets the tokens for this file.
public setTokens ( array $tokens ) : void
$tokens array
리턴 void

프로퍼티 상세

$cache 보호되어 있는 프로퍼티

The internal used cache instance.
부터: 0.10.0
protected CacheDriver,PDepend\Util\Cache $cache
리턴 PDepend\Util\Cache\CacheDriver

$cached 보호되어 있는 프로퍼티

Was this file instance restored from the cache?
부터: 0.10.0
protected bool $cached
리턴 boolean

$childNodes 보호되어 있는 프로퍼티

List of classes, interfaces and functions that parsed from this file.
부터: 0.10.0
protected AbstractASTArtifact[],PDepend\Source\AST $childNodes
리턴 PDepend\Source\AST\AbstractASTArtifact[]

$comment 보호되어 있는 프로퍼티

The comment for this type.
protected string $comment
리턴 string

$endLine 보호되어 있는 프로퍼티

The files end line.
부터: 0.10.0
protected int $endLine
리턴 integer

$fileName 보호되어 있는 프로퍼티

The source file name/path.
protected string $fileName
리턴 string

$id 보호되어 있는 프로퍼티

The unique identifier for this function.
protected string $id
리턴 string

$startLine 보호되어 있는 프로퍼티

The files start line. This property must always have the value 1.
부터: 0.10.0
protected int $startLine
리턴 integer