本文整理汇总了PHP中Doctrine\ORM\Query\Parser::StringPrimary方法的典型用法代码示例。如果您正苦于以下问题:PHP Parser::StringPrimary方法的具体用法?PHP Parser::StringPrimary怎么用?PHP Parser::StringPrimary使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doctrine\ORM\Query\Parser
的用法示例。
在下文中一共展示了Parser::StringPrimary方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: parse
/**
* @param Parser $parser
* @throws QueryException
*/
public function parse(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;
}
$this->pathExpressions[] = $parser->SingleValuedPathExpression();
while ($lexer->isNextToken(Lexer::T_COMMA)) {
$parser->match(Lexer::T_COMMA);
$this->pathExpressions[] = $parser->StringPrimary();
}
if ($lexer->isNextToken(Lexer::T_ORDER)) {
$this->orderBy = $parser->OrderByClause();
}
if ($lexer->isNextToken(Lexer::T_IDENTIFIER)) {
if (strtolower($lexer->lookahead['value']) !== self::T_SEPARATOR) {
$parser->syntaxError(self::T_SEPARATOR);
}
$parser->match(Lexer::T_IDENTIFIER);
$this->separator = $parser->StringPrimary();
}
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
示例2: 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();
$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);
}
示例3: parse
/**
* @url http://sysmagazine.com/posts/181666/
*
* {@inheritdoc}
*/
public function parse(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->parameters[self::DISTINCT_KEY] = true;
}
// first Path Expression is mandatory
$this->parameters[self::PARAMETER_KEY] = array();
$this->parameters[self::PARAMETER_KEY][] = $parser->SingleValuedPathExpression();
while ($lexer->isNextToken(Lexer::T_COMMA)) {
$parser->match(Lexer::T_COMMA);
$this->parameters[self::PARAMETER_KEY][] = $parser->StringPrimary();
}
if ($lexer->isNextToken(Lexer::T_ORDER)) {
$this->parameters[self::ORDER_KEY] = $parser->OrderByClause();
}
if ($lexer->isNextToken(Lexer::T_IDENTIFIER)) {
if (strtolower($lexer->lookahead['value']) !== 'separator') {
$parser->syntaxError('separator');
}
$parser->match(Lexer::T_IDENTIFIER);
$this->parameters[self::SEPARATOR_KEY] = $parser->StringPrimary();
}
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
示例4: parse
public function parse(Parser $parser)
{
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->ftsField = $parser->StringPrimary();
$parser->match(Lexer::T_COMMA);
$this->queryString = $parser->StringPrimary();
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
示例5: parse
public function parse(\Doctrine\ORM\Query\Parser $parser)
{
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->hstoreExpression = $parser->StringPrimary();
$parser->match(Lexer::T_COMMA);
$this->keyExpression = $parser->StringPrimary();
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
示例6: parse
/**
* @override
*/
public function parse(\Doctrine\ORM\Query\Parser $parser)
{
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->firstStringPrimary = $parser->StringPrimary();
$parser->match(Lexer::T_COMMA);
$this->secondStringPrimary = $parser->StringPrimary();
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
示例7: parse
public function parse(Parser $parser)
{
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->expr1 = $parser->StringPrimary();
$parser->match(Lexer::T_COMMA);
$this->expr2 = $parser->StringPrimary();
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
示例8: 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);
}
示例9: 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);
}
示例10: parse
/**
* {@inheritdoc}
*/
public function parse(Parser $parser)
{
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->dateExpression = $parser->ArithmeticExpression();
$parser->match(Lexer::T_COMMA);
$this->fromTz = $parser->StringPrimary();
$parser->match(Lexer::T_COMMA);
$this->toTz = $parser->StringPrimary();
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
示例11: parse
/**
* {@inheritdoc}
*/
public function parse(Parser $parser)
{
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->parameters[self::SEPARATOR_KEY] = $parser->StringPrimary();
$parser->match(Lexer::T_COMMA);
$this->parameters[self::STRINGS_KEY][] = $parser->StringPrimary();
while ($parser->getLexer()->isNextToken(Lexer::T_COMMA)) {
$parser->match(Lexer::T_COMMA);
$this->parameters[self::STRINGS_KEY][] = $parser->StringPrimary();
}
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
示例12: parse
public function parse(\Doctrine\ORM\Query\Parser $parser)
{
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->fieldName = $parser->StringPrimary();
$parser->match(Lexer::T_COMMA);
$this->queryString = $parser->StringPrimary();
if ($parser->getLexer()->lookahead['type'] == Lexer::T_COMMA) {
$parser->match(Lexer::T_COMMA);
$this->regconfig = $parser->StringPrimary();
}
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
示例13: parse
/**
* {@inheritdoc}
*/
public function parse(\Doctrine\ORM\Query\Parser $parser)
{
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->parameters['separator'] = $parser->StringPrimary();
$parser->match(Lexer::T_COMMA);
$this->parameters['strings'][] = $parser->StringPrimary();
while ($parser->getLexer()->isNextToken(Lexer::T_COMMA)) {
$parser->match(Lexer::T_COMMA);
$this->parameters['strings'][] = $parser->StringPrimary();
}
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
示例14: parse
public function parse(Parser $parser)
{
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->countryOrigin = $parser->StringPrimary();
$parser->match(Lexer::T_COMMA);
$this->postalCodeOrigin = $parser->StringPrimary();
$parser->match(Lexer::T_COMMA);
$this->countryDestination = $parser->StringPrimary();
$parser->match(Lexer::T_COMMA);
$this->postalCodeDestination = $parser->StringPrimary();
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}
示例15: parse
public function parse(\Doctrine\ORM\Query\Parser $parser)
{
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->fieldName = $parser->StringPrimary();
$parser->match(Lexer::T_COMMA);
$this->queryString = $parser->StringPrimary();
$lexer = $parser->getLexer();
if ($lexer->isNextToken(Lexer::T_COMMA)) {
$parser->match(Lexer::T_COMMA);
$this->configuration = $parser->StringPrimary();
}
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
}