本文整理匯總了PHP中Doctrine\ORM\Query\Parser::StringExpression方法的典型用法代碼示例。如果您正苦於以下問題:PHP Parser::StringExpression方法的具體用法?PHP Parser::StringExpression怎麽用?PHP Parser::StringExpression使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Doctrine\ORM\Query\Parser
的用法示例。
在下文中一共展示了Parser::StringExpression方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: parse
public function parse(\Doctrine\ORM\Query\Parser $parser)
{
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$lexer = $parser->getLexer();
if ($lexer->isNextToken(Lexer::T_DISTINCT)) {
$parser->match(Lexer::T_DISTINCT);
$this->isDistinct = true;
}
// first Path Expression is mandatory
$this->pathExp = array();
if ($lexer->isNextToken(Lexer::T_IDENTIFIER)) {
$this->pathExp[] = $parser->StringExpression();
} else {
$this->pathExp[] = $parser->SingleValuedPathExpression();
}
while ($lexer->isNextToken(Lexer::T_COMMA)) {
$parser->match(Lexer::T_COMMA);
$this->pathExp[] = $parser->StringPrimary();
}
if ($lexer->isNextToken(Lexer::T_ORDER)) {
$this->orderBy = $parser->OrderByClause();
}
if ($lexer->isNextToken(Lexer::T_IDENTIFIER)) {
if (strtolower($lexer->lookahead['value']) !== 'separator') {
$parser->syntaxError('separator');
}
$parser->match(Lexer::T_IDENTIFIER);
$this->separator = $parser->StringPrimary();
}
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
示例2: parse
public function parse(Parser $parser)
{
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->expr1 = $parser->StringExpression();
//SingleValuedPathExpression();
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
示例3: parse
public function parse(\Doctrine\ORM\Query\Parser $parser)
{
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->datetime = $parser->ArithmeticExpression();
$parser->match(Lexer::T_COMMA);
$this->fmt = $parser->StringExpression();
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
示例4: parse
public function parse(\Doctrine\ORM\Query\Parser $parser)
{
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->value = $parser->StringPrimary();
$parser->match(Lexer::T_COMMA);
$this->regexp = $parser->StringExpression();
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
示例5: parse
/**
* @override
*/
public function parse(\Doctrine\ORM\Query\Parser $parser)
{
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->basePrimary = $parser->StringExpression();
$parser->match(Lexer::T_COMMA);
$this->exponentPrimary = $parser->ArithmeticPrimary();
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
示例6: parse
/**
* Define the parser
*
* @param Parser $parser
*/
public function parse(Parser $parser)
{
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->subjectExpression = $parser->StringExpression();
$parser->match(Lexer::T_COMMA);
$this->findExpression = $parser->StringPrimary();
$parser->match(Lexer::T_COMMA);
$this->replaceExpression = $parser->StringPrimary();
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
示例7: parse
/**
* @param Parser $parser
*/
public function parse(Parser $parser)
{
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->column = $parser->StringPrimary()->value;
$parser->match(Lexer::T_COMMA);
$this->cond = $parser->StringPrimary()->value;
$parser->match(Lexer::T_COMMA);
$this->value = $parser->StringExpression()->value;
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
示例8: parse
/**
* @param \Doctrine\ORM\Query\Parser $parser
*/
public function parse(\Doctrine\ORM\Query\Parser $parser)
{
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->value = $parser->ArithmeticPrimary();
$parser->match(Lexer::T_COMMA);
$this->delimiter = $parser->StringExpression();
$parser->match(Lexer::T_COMMA);
$this->count = $parser->SimpleArithmeticExpression();
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
示例9: parse
/**
* @param \Doctrine\ORM\Query\Parser $parser
*/
public function parse(\Doctrine\ORM\Query\Parser $parser)
{
$lexer = $parser->getLexer();
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->date = $parser->ArithmeticExpression();
// parse second parameter if available
if (Lexer::T_COMMA === $lexer->lookahead['type']) {
$parser->match(Lexer::T_COMMA);
$this->fmt = $parser->StringExpression();
}
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
示例10: parse
/**
* @inheritdoc
*/
public function parse(Parser $parser)
{
$lexer = $parser->getLexer();
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->listaggField = $parser->StringPrimary();
if ($lexer->isNextToken(Lexer::T_COMMA)) {
$parser->match(Lexer::T_COMMA);
$this->separator = $parser->StringExpression();
}
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
if (!$lexer->isNextToken(Lexer::T_IDENTIFIER) || strtolower($lexer->lookahead['value']) != 'within') {
$parser->syntaxError('WITHIN GROUP');
}
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_GROUP);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->orderBy = $parser->OrderByClause();
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
if ($lexer->isNextToken(Lexer::T_IDENTIFIER)) {
if (strtolower($lexer->lookahead['value']) != 'over') {
$parser->syntaxError('OVER');
}
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
if (!$lexer->isNextToken(Lexer::T_IDENTIFIER) || strtolower($lexer->lookahead['value']) != 'partition') {
$parser->syntaxError('PARTITION BY');
}
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_BY);
$this->partitionBy[] = $parser->StringPrimary();
while ($lexer->isNextToken(Lexer::T_COMMA)) {
$parser->match(Lexer::T_COMMA);
$this->partitionBy[] = $parser->StringPrimary();
}
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
}