Class: Doctrine_Tokenizer
Source Location: /Doctrine/Tokenizer.phpClass Doctrine_Tokenizer
Doctrine_Tokenizer Located in /Doctrine/Tokenizer.php [line 33] Author(s):
|
static void | bracketExplode() | bracketExplode |
static void | bracketTrim() | trims brackets |
static array | clauseExplode() | clauseExplode |
static void | quoteExplode() | quoteExplode |
static array | sqlExplode() | sqlExplode |
Doctrine_Tokenizer | __construct() | |
void | tokenize() |
|
bracketExplode
example:
parameters: $str = (age < 20 AND age > 18) AND email LIKE 'John@example.com' $d = ' AND ' $e1 = '(' $e2 = ')'
would return an array: array("(age < 20 AND age > 18)", "email LIKE 'John@example.com'")
Parameters:string | $str: | |
string | $d: | the delimeter which explodes the string |
string | $e1: | the first bracket, usually '(' |
string | $e2: | the second bracket, usually ')' |
API Tags:
Access: | public |
|
trims brackets
Parameters:string | $str: | |
string | $e1: | the first bracket, usually '(' |
string | $e2: | the second bracket, usually ')' |
API Tags:
Access: | public |
|
clauseExplode
explodes a string into array using custom brackets and quote delimeters
example:
parameters: $str = "(age < 20 AND age > 18) AND name LIKE 'John Doe'" $d = ' ' $e1 = '(' $e2 = ')'
would return an array: array('(age < 20 AND age > 18)', 'name', 'LIKE', 'John Doe')
Parameters:string | $str: | |
string | $d: | the delimeter which explodes the string |
string | $e1: | the first bracket, usually '(' |
string | $e2: | the second bracket, usually ')' |
API Tags:
Access: | public |
|
quoteExplode
example:
parameters: $str = email LIKE 'John@example.com' $d = ' AND '
would return an array: array("email", "LIKE", "'John@example.com'")
Parameters:string | $str: | |
string | $d: | the delimeter which explodes the string |
API Tags:
Access: | public |
|
sqlExplode
explodes a string into array using custom brackets and quote delimeters
example:
parameters: $str = "(age < 20 AND age > 18) AND name LIKE 'John Doe'" $d = ' ' $e1 = '(' $e2 = ')'
would return an array: array('(age < 20 AND age > 18)', 'name', 'LIKE', 'John Doe')
Parameters:string | $str: | |
string | $d: | the delimeter which explodes the string |
string | $e1: | the first bracket, usually '(' |
string | $e2: | the second bracket, usually ')' |
API Tags:
Access: | public |
|
API Tags:
Access: | public |