PHP Class PHPSQLParser\processors\AbstractProcessor

Author: André Rothe ([email protected])
Afficher le fichier Open project: greenlion/php-sql-parser Class Usage Examples

Protected Properties

Свойство Type Description
$options PHPSQLParser\Options

Méthodes publiques

Méthode Description
__construct ( Options $options ) AbstractProcessor constructor.
process ( $tokens ) This function implements the main functionality of a processor class.
processComment ( $expression )
splitSQLIntoTokens ( $sql ) this function splits up a SQL statement into easy to "parse" tokens for the SQL processor
toArray ( $tokenList ) translates an array of objects into an associative array

Méthodes protégées

Méthode Description
array_insert_after ( $array, $key, $entry )
getVariableType ( $expression )
isAggregateFunction ( $out )
isBracketExpression ( $out )
isColumnReference ( $out )
isCommaToken ( $token )
isComment ( $out )
isCommentToken ( $token )
isConstant ( $out )
isCustomFunction ( $out )
isExpression ( $out )
isFunction ( $out )
isReserved ( $out )
isSubQuery ( $out )
isWhitespaceToken ( $token )
removeParenthesisFromStart ( $token ) This method removes parenthesis from start of the given string.
revokeQuotation ( $sql ) Revokes the quoting characters from an expression Possibibilies: a 'a' "a" a.b a.b a.b a.b It is also possible to have escaped quoting characters within an expression part: ab => ab And you can use whitespace between the parts: a . b => [a,b]

Method Details

__construct() public méthode

AbstractProcessor constructor.
public __construct ( Options $options )
$options PHPSQLParser\Options

array_insert_after() protected méthode

protected array_insert_after ( $array, $key, $entry )

getVariableType() protected méthode

protected getVariableType ( $expression )

isAggregateFunction() protected méthode

protected isAggregateFunction ( $out )

isBracketExpression() protected méthode

protected isBracketExpression ( $out )

isColumnReference() protected méthode

protected isColumnReference ( $out )

isCommaToken() protected méthode

protected isCommaToken ( $token )

isComment() protected méthode

protected isComment ( $out )

isCommentToken() protected méthode

protected isCommentToken ( $token )

isConstant() protected méthode

protected isConstant ( $out )

isCustomFunction() protected méthode

protected isCustomFunction ( $out )

isExpression() protected méthode

protected isExpression ( $out )

isFunction() protected méthode

protected isFunction ( $out )

isReserved() protected méthode

protected isReserved ( $out )

isSubQuery() protected méthode

protected isSubQuery ( $out )

isWhitespaceToken() protected méthode

protected isWhitespaceToken ( $token )

process() abstract public méthode

Always use default valuses for additional parameters within overridden functions.
abstract public process ( $tokens )

processComment() public méthode

public processComment ( $expression )

removeParenthesisFromStart() protected méthode

It removes also the associated closing parenthesis.
protected removeParenthesisFromStart ( $token )

revokeQuotation() protected méthode

Revokes the quoting characters from an expression Possibibilies: a 'a' "a" a.b a.b a.b a.b It is also possible to have escaped quoting characters within an expression part: ab => ab And you can use whitespace between the parts: a . b => [a,b]
protected revokeQuotation ( $sql )

splitSQLIntoTokens() public méthode

this function splits up a SQL statement into easy to "parse" tokens for the SQL processor
public splitSQLIntoTokens ( $sql )

toArray() public méthode

translates an array of objects into an associative array
public toArray ( $tokenList )

Property Details

$options protected_oe property

protected Options,PHPSQLParser $options
Résultat PHPSQLParser\Options