Property | Type | Description | |
---|---|---|---|
$KEYWORDS | array | Because, PHP's associative arrays are basically hash tables, it is more efficient to store keywords as keys instead of values. The value associated to each keyword represents its flags. | |
$MODE | integer | The mode of the MySQL server that will be used in lexing, parsing and building the statements. | |
$OPERATORS | array | List of operators and their flags. | |
$contextPrefix | string | The prefix concatenated to the context name when an incomplete class name is specified. | |
$defaultContext | string | The name of the default content. | |
$loadedContext | string | The name of the loaded context. |
Method | Description | |
---|---|---|
escape ( array | string $str, string $quote = '`' ) : string | Escapes the symbol by adding surrounding backticks. | |
isBool ( string $str ) : boolean | Checks if the given string is a boolean value. | |
isComment ( string $str ) : integer | Checks if the given string is the beginning of a whitespace. | |
isKeyword ( string $str, boolean $isReserved = false ) : integer | Checks if the given string is a keyword. | |
isNumber ( string $str ) : boolean | Checks if the given character can be a part of a number. | |
isOperator ( string $str ) : integer | Checks if the given string is an operator. | |
isSeparator ( string $str ) : boolean | Checks if the given character can be a separator for two lexeme. | |
isString ( string $str ) : integer | Checks if the given character is the beginning of a string. | |
isSymbol ( string $str ) : integer | Checks if the given character is the beginning of a symbol. A symbol can be either a variable or a field name. | |
isWhitespace ( string $str ) : boolean | Checks if the given character is a whitespace. | |
load ( string $context = '' ) : void | Loads the specified context. | |
loadClosest ( string $context = '' ) : string | Loads the context with the closest version to the one specified. | |
setMode ( string $mode = '' ) : void | Sets the SQL mode. |
public static isOperator ( string $str ) : integer | ||
$str | string | String to be checked. |
return | integer | The appropriate flag for the operator. |
public static isSeparator ( string $str ) : boolean | ||
$str | string | String to be checked. |
return | boolean |
public static isWhitespace ( string $str ) : boolean | ||
$str | string | String to be checked. |
return | boolean |
public static loadClosest ( string $context = '' ) : string | ||
$context | string | Name of the context or full class name that defines the context. |
return | string | The loaded context. `null` if no context was loaded. |
public static array $KEYWORDS | ||
return | array |
public static int $MODE | ||
return | integer |
public static array $OPERATORS | ||
return | array |
public static string $contextPrefix | ||
return | string |
public static string $defaultContext | ||
return | string |
public static string $loadedContext | ||
return | string |