프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$CLAUSES | array | The value attributed to each clause is used by the builder and it may have one of the following values: - 1 = 01 - add the clause only - 2 = 10 - add the keyword - 3 = 11 - add both the keyword and the clause | |
$OPTIONS | array | The option would be the key and the value can be an integer or an array. The integer represents only the index used. The array may have two keys: 0 is used to represent the index used and 1 is the type of the option (which may be 'var' or 'var='). Both options mean they expect a value after the option (e.g. A = B or A B, in which case A is the key and B is the value). The only difference is in the building process. var options are built as A B and var= options are built as A = B Two options that can be used together must have different values for indexes, else, when they will be used together, an error will occur. | |
$first | integer | The index of the first token used in this statement. | |
$last | integer | The index of the last token used in this statement. | |
$options | The options of this query. |
메소드 | 설명 | |
---|---|---|
__construct ( Parser $parser = null, |
Constructor. | |
__toString ( ) : string | Builds the string representation of this statement. | |
after ( Parser $parser, |
Function called after the token was processed. | |
before ( Parser $parser, |
Function called before the token is processed. | |
build ( ) : string | Builds the string representation of this statement. | |
getClauses ( ) : array | Gets the clauses of this statement. | |
parse ( Parser $parser, |
Parses the statements defined by the tokens list. | |
validateClauseOrder ( Parser $parser, |
Validates the order of the clauses in parsed statement Ideally this should be called after successfully completing the parsing of each statement |
public __construct ( Parser $parser = null, |
||
$parser | Parser | The instance that requests parsing. |
$list | The list of tokens to be parsed. |
public __toString ( ) : string | ||
리턴 | string |
public validateClauseOrder ( Parser $parser, |
||
$parser | Parser | The instance that requests parsing. |
$list | The list of tokens to be parsed. | |
리턴 | boolean |
public static array $CLAUSES | ||
리턴 | array |
public static array $OPTIONS | ||
리턴 | array |