PHP 클래스 SqlParser\TokensList

상속: implements ArrayAccess
파일 보기 프로젝트 열기: phpmyadmin/sql-parser 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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 ( Token $token ) : void Adds a new token.
build ( string | Token[] | TokensList $list ) : string Builds an array of tokens by merging their raw value.
getNext ( ) : Token Gets the next token. Skips any irrelevant token (whitespaces and comments).
getNextOfType ( integer $type ) : Token Gets the next token.
getNextOfTypeAndValue ( integer $type, string $value ) : Token Gets the next token.
offsetExists ( integer $offset ) : boolean Checks if an offset was previously set.
offsetGet ( integer $offset ) : Token Gets a value from the container.
offsetSet ( integer $offset, Token $value ) : void Sets an value inside the container.
offsetUnset ( integer $offset ) : void Unsets the value of an offset.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( array $tokens = [], integer $count )
$tokens array The initial array of tokens.
$count integer The count of tokens in the initial array.

add() 공개 메소드

Adds a new token.
public add ( Token $token ) : void
$token Token Token to be added in list.
리턴 void

build() 공개 정적인 메소드

Builds an array of tokens by merging their raw value.
public static build ( string | Token[] | TokensList $list ) : string
$list string | Token[] | TokensList The tokens to be built.
리턴 string

getNext() 공개 메소드

Gets the next token. Skips any irrelevant token (whitespaces and comments).
public getNext ( ) : Token
리턴 Token

getNextOfType() 공개 메소드

Gets the next token.
public getNextOfType ( integer $type ) : Token
$type integer The type.
리턴 Token

getNextOfTypeAndValue() 공개 메소드

Gets the next token.
public getNextOfTypeAndValue ( integer $type, string $value ) : Token
$type integer The type of the token.
$value string The value of the token.
리턴 Token

offsetExists() 공개 메소드

Checks if an offset was previously set.
public offsetExists ( integer $offset ) : boolean
$offset integer The offset to be checked.
리턴 boolean

offsetGet() 공개 메소드

Gets a value from the container.
public offsetGet ( integer $offset ) : Token
$offset integer The offset to be returned.
리턴 Token

offsetSet() 공개 메소드

Sets an value inside the container.
public offsetSet ( integer $offset, Token $value ) : void
$offset integer The offset to be set.
$value Token The token to be saved.
리턴 void

offsetUnset() 공개 메소드

Unsets the value of an offset.
public offsetUnset ( integer $offset ) : void
$offset integer The offset to be unset.
리턴 void

프로퍼티 상세

$count 공개적으로 프로퍼티

The count of tokens.
public int $count
리턴 integer

$idx 공개적으로 프로퍼티

The index of the next token to be returned.
public int $idx
리턴 integer

$tokens 공개적으로 프로퍼티

The array of tokens.
public array $tokens
리턴 array