PHP 클래스 PDepend\Source\Language\PHP\PHPTokenizerInternal

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

보호된 프로퍼티들

프로퍼티 타입 설명
$alternativeMap array(integer=>array) BuilderContext sensitive alternative mappings.
$count integer Count of all tokens.
$index integer Internal stream pointer index.
$literalMap array(string=>integer) Mapping between php internal text tokens an php depend numeric tokens.
$reductionMap
$sourceFile PDepend\Source\AST\ASTCompilationUnit The source file instance.
$substituteTokens array(mixed=>array)
$tokenMap array(integer=>integer) Mapping between php internal tokens and php depend tokens.
$tokens PDepend\Source\Tokenizer\Token[] Prepared token list.

공개 메소드들

메소드 설명
getSourceFile ( ) : ASTCompilationUnit Returns the name of the source file.
next ( ) : PDepend\Source\Tokenizer\Token | integer Returns the next token or {@link \PDepend\Source\Tokenizer\Tokenizer::T_EOF} if there is no next token.
peek ( ) : integer Returns the next token type or {@link \PDepend\Source\Tokenizer\Tokenizer::T_EOF} if there is no next token.
peekNext ( ) : integer Returns the type of next token, after the current token. This method ignores all comments between the current and the next token.
prev ( ) : integer Returns the previous token type or {@link \PDepend\Source\Tokenizer\Tokenizer::T_BOF} if there is no previous token.
setSourceFile ( string $sourceFile ) : void Sets a new php source file.

비공개 메소드들

메소드 설명
consumeNonePhpTokens ( array &$tokens ) : string This method fetches all tokens until an opening php tag was found and it returns the collected content. The returned value will be null if there was no none php token.
generateUnknownToken ( string $token ) : array(integer Generates a dummy/temp token for unknown string literals.
substituteTokens ( array $tokens ) : array(array) This method takes an array of tokens returned by token_get_all() and substitutes some of the tokens with those required by PDepend's parser implementation.
tokenize ( ) : void Tokenizes the content of the source file with {@link token_get_all()} and filters this token stream.

메소드 상세

getSourceFile() 공개 메소드

Returns the name of the source file.
public getSourceFile ( ) : ASTCompilationUnit
리턴 PDepend\Source\AST\ASTCompilationUnit

next() 공개 메소드

Returns the next token or {@link \PDepend\Source\Tokenizer\Tokenizer::T_EOF} if there is no next token.
public next ( ) : PDepend\Source\Tokenizer\Token | integer
리턴 PDepend\Source\Tokenizer\Token | integer

peek() 공개 메소드

Returns the next token type or {@link \PDepend\Source\Tokenizer\Tokenizer::T_EOF} if there is no next token.
public peek ( ) : integer
리턴 integer

peekNext() 공개 메소드

Returns the type of next token, after the current token. This method ignores all comments between the current and the next token.
부터: 0.9.12
public peekNext ( ) : integer
리턴 integer

prev() 공개 메소드

Returns the previous token type or {@link \PDepend\Source\Tokenizer\Tokenizer::T_BOF} if there is no previous token.
public prev ( ) : integer
리턴 integer

setSourceFile() 공개 메소드

Sets a new php source file.
public setSourceFile ( string $sourceFile ) : void
$sourceFile string A php source file.
리턴 void

프로퍼티 상세

$alternativeMap 보호되어 있는 정적으로 프로퍼티

BuilderContext sensitive alternative mappings.
protected static array(integer=>array) $alternativeMap
리턴 array(integer=>array)

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

Count of all tokens.
protected int $count
리턴 integer

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

Internal stream pointer index.
protected int $index
리턴 integer

$literalMap 보호되어 있는 정적으로 프로퍼티

Mapping between php internal text tokens an php depend numeric tokens.
protected static array(string=>integer) $literalMap
리턴 array(string=>integer)

$reductionMap 보호되어 있는 정적으로 프로퍼티

protected static $reductionMap

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

The source file instance.
protected ASTCompilationUnit,PDepend\Source\AST $sourceFile
리턴 PDepend\Source\AST\ASTCompilationUnit

$substituteTokens 보호되어 있는 정적으로 프로퍼티

protected static array(mixed=>array) $substituteTokens
리턴 array(mixed=>array)

$tokenMap 보호되어 있는 정적으로 프로퍼티

Mapping between php internal tokens and php depend tokens.
protected static array(integer=>integer) $tokenMap
리턴 array(integer=>integer)

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

Prepared token list.
protected Token[],PDepend\Source\Tokenizer $tokens
리턴 PDepend\Source\Tokenizer\Token[]