Свойство | Тип | Описание | |
---|---|---|---|
$count | integer | The count of tokens. | |
$idx | integer | The index of the next token to be returned. | |
$tokens | array | The array of tokens. |
Метод | Описание | |
---|---|---|
__construct ( array $tokens = [], integer $count ) | Constructor. | |
add ( |
Adds a new token. | |
build ( string | |
Builds an array of tokens by merging their raw value. | |
getNext ( ) : |
Gets the next token. Skips any irrelevant token (whitespaces and comments). | |
getNextOfType ( integer $type ) : |
Gets the next token. | |
getNextOfTypeAndValue ( integer $type, string $value ) : |
Gets the next token. | |
offsetExists ( integer $offset ) : boolean | Checks if an offset was previously set. | |
offsetGet ( integer $offset ) : |
Gets a value from the container. | |
offsetSet ( integer $offset, |
Sets an value inside the container. | |
offsetUnset ( integer $offset ) : void | Unsets the value of an offset. |
public __construct ( array $tokens = [], integer $count ) | ||
$tokens | array | The initial array of tokens. |
$count | integer | The count of tokens in the initial array. |
public getNext ( ) : |
||
Результат |
public getNextOfType ( integer $type ) : |
||
$type | integer | The type. |
Результат |
public getNextOfTypeAndValue ( integer $type, string $value ) : |
||
$type | integer | The type of the token. |
$value | string | The value of the token. |
Результат |
public offsetExists ( integer $offset ) : boolean | ||
$offset | integer | The offset to be checked. |
Результат | boolean |
public offsetUnset ( integer $offset ) : void | ||
$offset | integer | The offset to be unset. |
Результат | void |
public int $idx | ||
Результат | integer |