__construct()
count()
current()
findNextByType()
findPreviousByType()
getFilename()
getTokenIdsOfBracePair()
getTokenIdsOfParenthesisPair()
gotoNextByType()
gotoPreviousByType()
key()
next()
offsetExists()
offsetGet()
offsetSet()
offsetUnset()
previous()
rewind()
seek()
serialize()
setFilename()
unserialize()
valid()
findByTypeInDirection()
getTokenIdsBetweenPair()
gotoTokenByTypeInDirection()
$count
$current
$filename
$key
$store
Iterator class responsible for navigating through a list of Tokens.
| category | phpDocumentor |
|---|---|
| package | Reflection |
| author | Mike van Riel |
| license | MIT |
| link | http://phpdoc.org |
__construct(string | \phpDocumentor_Reflection_Token[] | \string[] $data)
| see | \token_get_all() |
|---|
string\phpDocumentor_Reflection_Token[]\string[]String to parse or a list of phpDocumentor_Tokens, or the result from a token_get_all() method call.
count() : int
| inherited_from | \phpDocumentor_Reflection_TokenIteratorBase::count() |
|---|
intcurrent() : mixed
| inherited_from | \phpDocumentor_Reflection_TokenIteratorBase::current() |
|---|
mixedfindNextByType(int $type, int $max_count, \string[] $stop_at) : bool | \phpDocumentor_Reflection_Token
intThe type of token to find as identified by the token constants, i.e. T_STRING
intThe maximum number of tokens to iterate, 0 is unlimited (not recommended)
\string[]Stops searching when one of these token constants or literals is encountered
findPreviousByType(int $type, int $max_count, \string[] $stop_at) : bool | \phpDocumentor_Reflection_Token
intThe type of token to find as identified by the token constants, i.e. T_STRING
intThe maximum number of tokens to iterate, 0 is unlimited (not recommended)
\string[]Stops searching when one of these token constants or literals is encountered
getFilename() : null | string
nullstring
getTokenIdsOfBracePair() : \int[]
\int[]getTokenIdsOfParenthesisPair() : \int[]
\int[]gotoNextByType(int $type, int $max_count, \string[] $stop_at) : bool | \phpDocumentor_Reflection_Token
intThe type of token to find as identified by the token constants, i.e. T_STRING
intThe maximum number of tokens to iterate, 0 is unlimited (not recommended)
\string[]Stops searching when one of these token constants or literals is encountered
gotoPreviousByType(int $type, int $max_count, \string[] $stop_at) : bool | \phpDocumentor_Reflection_Token
intThe type of token to find as identified by the token constants, i.e. T_STRING
intThe maximum number of tokens to iterate, 0 is unlimited (not recommended)
\string[]Stops searching when one of these token constants or literals is encountered
key() : int | null
| inherited_from | \phpDocumentor_Reflection_TokenIteratorBase::key() |
|---|
intnull
next() : false | mixed | null
| inherited_from | \phpDocumentor_Reflection_TokenIteratorBase::next() |
|---|
falsemixednull
offsetExists(integer $offset) : bool
| inherited_from | \phpDocumentor_Reflection_TokenIteratorBase::offsetExists() |
|---|
integerthe index to check.
booloffsetGet(string $offset) : mixed | null
| inherited_from | \phpDocumentor_Reflection_TokenIteratorBase::offsetGet() |
|---|
stringThe index to retrieve.
mixednull
offsetSet(integer $offset, \phpDocumentor_Reflection_Token $value) : void
| inherited_from | \phpDocumentor_Reflection_TokenIteratorBase::offsetSet() |
|---|
integerOffset to overwrite.
\BadMethodCallException |
when the user tries to add an item. |
|---|
offsetUnset(int $offset) : void
| inherited_from | \phpDocumentor_Reflection_TokenIteratorBase::offsetUnset() |
|---|
intOffset to remove.
\BadMethodCallException |
if the user invokes this method. |
|---|
previous() : false | mixed | null
| inherited_from | \phpDocumentor_Reflection_TokenIteratorBase::previous() |
|---|
falsemixednull
rewind() : mixed | null
| inherited_from | \phpDocumentor_Reflection_TokenIteratorBase::rewind() |
|---|
mixednull
seek(int | string $key) : mixed
NOTE: this function is used A LOT during the reflection process. This should be as high-performance as possible and ways should be devised to not use it.
| inherited_from | \phpDocumentor_Reflection_TokenIteratorBase::seek() |
|---|
intstringthe index to move to.
mixedserialize() : string
| inherited_from | \phpDocumentor_Reflection_TokenIteratorBase::serialize() |
|---|
stringsetFilename(string $filename) : void
stringpath to the file which contains these tokens.
unserialize(string $serialized) : void
| inherited_from | \phpDocumentor_Reflection_TokenIteratorBase::unserialize() |
|---|
stringString to unserialize.
valid() : boolean
| inherited_from | \phpDocumentor_Reflection_TokenIteratorBase::valid() |
|---|
booleanfindByTypeInDirection(int $type, string $direction, int $max_count, \string[] $stop_at) : bool | \phpDocumentor_Reflection_Token
Note: this function does _not_ move the internal pointer.
intThe type of token to find as identified by the token constants, i.e. T_STRING
stringThe direction where to search, may be 'next' or 'previous'
intThe maximum number of tokens to iterate, 0 is unlimited (not recommended)
\string[]Stops searching when one of these token constants or literals is encountered
\InvalidArgumentException |
|---|
getTokenIdsBetweenPair(string $start_literal, string $end_literal) : \int[]
stringOpening character, i.e. {
stringClosing character, i.e. }
\int[]gotoTokenByTypeInDirection(int $type, string $direction, int $max_count, \string[] $stop_at) : bool | \phpDocumentor_Reflection_Token
intThe type of token to find as identified by the token constants, i.e. T_STRING
stringThe direction where to search, may be 'next' or 'previous'
intThe maximum number of tokens to iterate, 0 is unlimited (not recommended)
\string[]Stops searching when one of these token constants or literals is encountered
\InvalidArgumentException |
|---|
$count : int
| inherited_from | \phpDocumentor_Reflection_TokenIteratorBase::$$count |
|---|
$current : mixed
| inherited_from | \phpDocumentor_Reflection_TokenIteratorBase::$$current |
|---|
$filename : string | null
$key : int
| inherited_from | \phpDocumentor_Reflection_TokenIteratorBase::$$key |
|---|
$store : \mixed[]
| inherited_from | \phpDocumentor_Reflection_TokenIteratorBase::$$store |
|---|