1
0
Fork 0
mirror of synced 2025-04-03 13:23:37 +03:00

Fixed documentation for Doctrine\ORM\Query\AST

This commit is contained in:
Benjamin Morel 2012-12-13 11:52:19 +00:00
parent f743da0e02
commit 98ac6b5fec
57 changed files with 841 additions and 75 deletions

View file

@ -26,8 +26,13 @@ use Doctrine\ORM\Query\QueryException;
*/ */
class ASTException extends QueryException class ASTException extends QueryException
{ {
/**
* @param Node $node
*
* @return ASTException
*/
public static function noDispatchForNode($node) public static function noDispatchForNode($node)
{ {
return new self("Double-dispatch for node " . get_class($node) . " is not supported."); return new self("Double-dispatch for node " . get_class($node) . " is not supported.");
} }
} }

View file

@ -20,9 +20,8 @@
namespace Doctrine\ORM\Query\AST; namespace Doctrine\ORM\Query\AST;
/** /**
* Description of AggregateExpression * Description of AggregateExpression.
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,10 +30,28 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class AggregateExpression extends Node class AggregateExpression extends Node
{ {
/**
* @var string
*/
public $functionName; public $functionName;
public $pathExpression;
public $isDistinct = false; // Some aggregate expressions support distinct, eg COUNT
/**
* @var PathExpression|SimpleArithmeticExpression
*/
public $pathExpression;
/**
* Some aggregate expressions support distinct, eg COUNT.
*
* @var bool
*/
public $isDistinct = false;
/**
* @param string $functionName
* @param PathExpression|SimpleArithmeticExpression $pathExpression
* @param bool $isDistinct
*/
public function __construct($functionName, $pathExpression, $isDistinct) public function __construct($functionName, $pathExpression, $isDistinct)
{ {
$this->functionName = $functionName; $this->functionName = $functionName;
@ -42,6 +59,9 @@ class AggregateExpression extends Node
$this->isDistinct = $isDistinct; $this->isDistinct = $isDistinct;
} }
/**
* {@inheritdoc}
*/
public function dispatch($walker) public function dispatch($walker)
{ {
return $walker->walkAggregateExpression($this); return $walker->walkAggregateExpression($this);

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* ArithmeticExpression ::= SimpleArithmeticExpression | "(" Subselect ")" * ArithmeticExpression ::= SimpleArithmeticExpression | "(" Subselect ")"
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,19 +30,35 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class ArithmeticExpression extends Node class ArithmeticExpression extends Node
{ {
/**
* @var SimpleArithmeticExpression|null
*/
public $simpleArithmeticExpression; public $simpleArithmeticExpression;
/**
* @var Subselect|null
*/
public $subselect; public $subselect;
/**
* @return bool
*/
public function isSimpleArithmeticExpression() public function isSimpleArithmeticExpression()
{ {
return (bool) $this->simpleArithmeticExpression; return (bool) $this->simpleArithmeticExpression;
} }
/**
* @return bool
*/
public function isSubselect() public function isSubselect()
{ {
return (bool) $this->subselect; return (bool) $this->subselect;
} }
/**
* {@inheritdoc}
*/
public function dispatch($walker) public function dispatch($walker)
{ {
return $walker->walkArithmeticExpression($this); return $walker->walkArithmeticExpression($this);

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* ArithmeticFactor ::= [("+" | "-")] ArithmeticPrimary * ArithmeticFactor ::= [("+" | "-")] ArithmeticPrimary
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -32,31 +31,46 @@ namespace Doctrine\ORM\Query\AST;
class ArithmeticFactor extends Node class ArithmeticFactor extends Node
{ {
/** /**
* @var ArithmeticPrimary * @var mixed
*/ */
public $arithmeticPrimary; public $arithmeticPrimary;
/** /**
* @var null|boolean NULL represents no sign, TRUE means positive and FALSE means negative sign * NULL represents no sign, TRUE means positive and FALSE means negative sign.
*
* @var null|boolean
*/ */
public $sign; public $sign;
/**
* @param mixed $arithmeticPrimary
* @param null|bool $sign
*/
public function __construct($arithmeticPrimary, $sign = null) public function __construct($arithmeticPrimary, $sign = null)
{ {
$this->arithmeticPrimary = $arithmeticPrimary; $this->arithmeticPrimary = $arithmeticPrimary;
$this->sign = $sign; $this->sign = $sign;
} }
/**
* @return bool
*/
public function isPositiveSigned() public function isPositiveSigned()
{ {
return $this->sign === true; return $this->sign === true;
} }
/**
* @return bool
*/
public function isNegativeSigned() public function isNegativeSigned()
{ {
return $this->sign === false; return $this->sign === false;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkArithmeticFactor($this); return $sqlWalker->walkArithmeticFactor($this);

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* ArithmeticTerm ::= ArithmeticFactor {("*" | "/") ArithmeticFactor}* * ArithmeticTerm ::= ArithmeticFactor {("*" | "/") ArithmeticFactor}*
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,13 +30,22 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class ArithmeticTerm extends Node class ArithmeticTerm extends Node
{ {
/**
* @var array
*/
public $arithmeticFactors; public $arithmeticFactors;
/**
* @param array $arithmeticFactors
*/
public function __construct(array $arithmeticFactors) public function __construct(array $arithmeticFactors)
{ {
$this->arithmeticFactors = $arithmeticFactors; $this->arithmeticFactors = $arithmeticFactors;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkArithmeticTerm($this); return $sqlWalker->walkArithmeticTerm($this);

View file

@ -20,9 +20,8 @@
namespace Doctrine\ORM\Query\AST; namespace Doctrine\ORM\Query\AST;
/** /**
* Description of BetweenExpression * Description of BetweenExpression.
* *
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,11 +30,31 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class BetweenExpression extends Node class BetweenExpression extends Node
{ {
/**
* @var ArithmeticExpression
*/
public $expression; public $expression;
/**
* @var ArithmeticExpression
*/
public $leftBetweenExpression; public $leftBetweenExpression;
/**
* @var ArithmeticExpression
*/
public $rightBetweenExpression; public $rightBetweenExpression;
/**
* @var bool
*/
public $not; public $not;
/**
* @param ArithmeticExpression $expr
* @param ArithmeticExpression $leftExpr
* @param ArithmeticExpression $rightExpr
*/
public function __construct($expr, $leftExpr, $rightExpr) public function __construct($expr, $leftExpr, $rightExpr)
{ {
$this->expression = $expr; $this->expression = $expr;
@ -43,9 +62,11 @@ class BetweenExpression extends Node
$this->rightBetweenExpression = $rightExpr; $this->rightBetweenExpression = $rightExpr;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkBetweenExpression($this); return $sqlWalker->walkBetweenExpression($this);
} }
} }

View file

@ -32,14 +32,22 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class CoalesceExpression extends Node class CoalesceExpression extends Node
{ {
/**
* @var array
*/
public $scalarExpressions = array(); public $scalarExpressions = array();
/**
* @param array $scalarExpressions
*/
public function __construct(array $scalarExpressions) public function __construct(array $scalarExpressions)
{ {
$this->scalarExpressions = $scalarExpressions; $this->scalarExpressions = $scalarExpressions;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkCoalesceExpression($this); return $sqlWalker->walkCoalesceExpression($this);

View file

@ -32,18 +32,32 @@ namespace Doctrine\ORM\Query\AST;
class CollectionMemberExpression extends Node class CollectionMemberExpression extends Node
{ {
public $entityExpression; public $entityExpression;
/**
* @var PathExpression
*/
public $collectionValuedPathExpression; public $collectionValuedPathExpression;
/**
* @var bool
*/
public $not; public $not;
/**
* @param mixed $entityExpr
* @param PathExpression $collValuedPathExpr
*/
public function __construct($entityExpr, $collValuedPathExpr) public function __construct($entityExpr, $collValuedPathExpr)
{ {
$this->entityExpression = $entityExpr; $this->entityExpression = $entityExpr;
$this->collectionValuedPathExpression = $collValuedPathExpr; $this->collectionValuedPathExpression = $collValuedPathExpr;
} }
/**
* {@inheritdoc}
*/
public function dispatch($walker) public function dispatch($walker)
{ {
return $walker->walkCollectionMemberExpression($this); return $walker->walkCollectionMemberExpression($this);
} }
} }

View file

@ -27,7 +27,6 @@ namespace Doctrine\ORM\Query\AST;
* DatetimeExpression ComparisonOperator (DatetimeExpression | QuantifiedExpression) | * DatetimeExpression ComparisonOperator (DatetimeExpression | QuantifiedExpression) |
* EntityExpression ("=" | "<>") (EntityExpression | QuantifiedExpression) * EntityExpression ("=" | "<>") (EntityExpression | QuantifiedExpression)
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -36,10 +35,26 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class ComparisonExpression extends Node class ComparisonExpression extends Node
{ {
/**
* @var Node
*/
public $leftExpression; public $leftExpression;
/**
* @var Node
*/
public $rightExpression; public $rightExpression;
/**
* @var string
*/
public $operator; public $operator;
/**
* @param Node $leftExpr
* @param string $operator
* @param Node $rightExpr
*/
public function __construct($leftExpr, $operator, $rightExpr) public function __construct($leftExpr, $operator, $rightExpr)
{ {
$this->leftExpression = $leftExpr; $this->leftExpression = $leftExpr;
@ -47,6 +62,9 @@ class ComparisonExpression extends Node
$this->operator = $operator; $this->operator = $operator;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkComparisonExpression($this); return $sqlWalker->walkComparisonExpression($this);

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* ConditionalExpression ::= ConditionalTerm {"OR" ConditionalTerm}* * ConditionalExpression ::= ConditionalTerm {"OR" ConditionalTerm}*
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,13 +30,22 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class ConditionalExpression extends Node class ConditionalExpression extends Node
{ {
/**
* @var array
*/
public $conditionalTerms = array(); public $conditionalTerms = array();
/**
* @param array $conditionalTerms
*/
public function __construct(array $conditionalTerms) public function __construct(array $conditionalTerms)
{ {
$this->conditionalTerms = $conditionalTerms; $this->conditionalTerms = $conditionalTerms;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkConditionalExpression($this); return $sqlWalker->walkConditionalExpression($this);

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* ConditionalFactor ::= ["NOT"] ConditionalPrimary * ConditionalFactor ::= ["NOT"] ConditionalPrimary
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,14 +30,27 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class ConditionalFactor extends Node class ConditionalFactor extends Node
{ {
/**
* @var bool
*/
public $not = false; public $not = false;
/**
* @var ConditionalPrimary
*/
public $conditionalPrimary; public $conditionalPrimary;
/**
* @param ConditionalPrimary $conditionalPrimary
*/
public function __construct($conditionalPrimary) public function __construct($conditionalPrimary)
{ {
$this->conditionalPrimary = $conditionalPrimary; $this->conditionalPrimary = $conditionalPrimary;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkConditionalFactor($this); return $sqlWalker->walkConditionalFactor($this);

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* ConditionalPrimary ::= SimpleConditionalExpression | "(" ConditionalExpression ")" * ConditionalPrimary ::= SimpleConditionalExpression | "(" ConditionalExpression ")"
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,19 +30,35 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class ConditionalPrimary extends Node class ConditionalPrimary extends Node
{ {
/**
* @var Node|null
*/
public $simpleConditionalExpression; public $simpleConditionalExpression;
/**
* @var ConditionalExpression|null
*/
public $conditionalExpression; public $conditionalExpression;
/**
* @return bool
*/
public function isSimpleConditionalExpression() public function isSimpleConditionalExpression()
{ {
return (bool) $this->simpleConditionalExpression; return (bool) $this->simpleConditionalExpression;
} }
/**
* @return bool
*/
public function isConditionalExpression() public function isConditionalExpression()
{ {
return (bool) $this->conditionalExpression; return (bool) $this->conditionalExpression;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkConditionalPrimary($this); return $sqlWalker->walkConditionalPrimary($this);

View file

@ -21,7 +21,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* ConditionalTerm ::= ConditionalFactor {"AND" ConditionalFactor}* * ConditionalTerm ::= ConditionalFactor {"AND" ConditionalFactor}*
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -30,13 +29,22 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class ConditionalTerm extends Node class ConditionalTerm extends Node
{ {
/**
* @var array
*/
public $conditionalFactors = array(); public $conditionalFactors = array();
/**
* @param array $conditionalFactors
*/
public function __construct(array $conditionalFactors) public function __construct(array $conditionalFactors)
{ {
$this->conditionalFactors = $conditionalFactors; $this->conditionalFactors = $conditionalFactors;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkConditionalTerm($this); return $sqlWalker->walkConditionalTerm($this);

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* DeleteClause ::= "DELETE" ["FROM"] AbstractSchemaName [["AS"] AliasIdentificationVariable] * DeleteClause ::= "DELETE" ["FROM"] AbstractSchemaName [["AS"] AliasIdentificationVariable]
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,17 +30,29 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class DeleteClause extends Node class DeleteClause extends Node
{ {
/**
* @var string
*/
public $abstractSchemaName; public $abstractSchemaName;
/**
* @var string
*/
public $aliasIdentificationVariable; public $aliasIdentificationVariable;
/**
* @param string $abstractSchemaName
*/
public function __construct($abstractSchemaName) public function __construct($abstractSchemaName)
{ {
$this->abstractSchemaName = $abstractSchemaName; $this->abstractSchemaName = $abstractSchemaName;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkDeleteClause($this); return $sqlWalker->walkDeleteClause($this);
} }
} }

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* DeleteStatement = DeleteClause [WhereClause] * DeleteStatement = DeleteClause [WhereClause]
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,14 +30,27 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class DeleteStatement extends Node class DeleteStatement extends Node
{ {
/**
* @var DeleteClause
*/
public $deleteClause; public $deleteClause;
/**
* @var WhereClause|null
*/
public $whereClause; public $whereClause;
/**
* @param DeleteClause $deleteClause
*/
public function __construct($deleteClause) public function __construct($deleteClause)
{ {
$this->deleteClause = $deleteClause; $this->deleteClause = $deleteClause;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkDeleteStatement($this); return $sqlWalker->walkDeleteStatement($this);

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* EmptyCollectionComparisonExpression ::= CollectionValuedPathExpression "IS" ["NOT"] "EMPTY" * EmptyCollectionComparisonExpression ::= CollectionValuedPathExpression "IS" ["NOT"] "EMPTY"
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,17 +30,29 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class EmptyCollectionComparisonExpression extends Node class EmptyCollectionComparisonExpression extends Node
{ {
/**
* @var PathExpression
*/
public $expression; public $expression;
/**
* @var bool
*/
public $not; public $not;
/**
* @param PathExpression $expression
*/
public function __construct($expression) public function __construct($expression)
{ {
$this->expression = $expression; $this->expression = $expression;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkEmptyCollectionComparisonExpression($this); return $sqlWalker->walkEmptyCollectionComparisonExpression($this);
} }
} }

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* ExistsExpression ::= ["NOT"] "EXISTS" "(" Subselect ")" * ExistsExpression ::= ["NOT"] "EXISTS" "(" Subselect ")"
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,17 +30,29 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class ExistsExpression extends Node class ExistsExpression extends Node
{ {
/**
* @var bool
*/
public $not; public $not;
/**
* @var Subselect
*/
public $subselect; public $subselect;
/**
* @param Subselect $subselect
*/
public function __construct($subselect) public function __construct($subselect)
{ {
$this->subselect = $subselect; $this->subselect = $subselect;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkExistsExpression($this); return $sqlWalker->walkExistsExpression($this);
} }
} }

View file

@ -31,13 +31,22 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class FromClause extends Node class FromClause extends Node
{ {
/**
* @var array
*/
public $identificationVariableDeclarations = array(); public $identificationVariableDeclarations = array();
/**
* @param array $identificationVariableDeclarations
*/
public function __construct(array $identificationVariableDeclarations) public function __construct(array $identificationVariableDeclarations)
{ {
$this->identificationVariableDeclarations = $identificationVariableDeclarations; $this->identificationVariableDeclarations = $identificationVariableDeclarations;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkFromClause($this); return $sqlWalker->walkFromClause($this);

View file

@ -32,15 +32,29 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class GeneralCaseExpression extends Node class GeneralCaseExpression extends Node
{ {
/**
* @var array
*/
public $whenClauses = array(); public $whenClauses = array();
/**
* @var mixed
*/
public $elseScalarExpression = null; public $elseScalarExpression = null;
/**
* @param array $whenClauses
* @param mixed $elseScalarExpression
*/
public function __construct(array $whenClauses, $elseScalarExpression) public function __construct(array $whenClauses, $elseScalarExpression)
{ {
$this->whenClauses = $whenClauses; $this->whenClauses = $whenClauses;
$this->elseScalarExpression = $elseScalarExpression; $this->elseScalarExpression = $elseScalarExpression;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkGeneralCaseExpression($this); return $sqlWalker->walkGeneralCaseExpression($this);

View file

@ -20,9 +20,8 @@
namespace Doctrine\ORM\Query\AST; namespace Doctrine\ORM\Query\AST;
/** /**
* Description of GroupByClause * Description of GroupByClause.
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,13 +30,22 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class GroupByClause extends Node class GroupByClause extends Node
{ {
/**
* @var array
*/
public $groupByItems = array(); public $groupByItems = array();
/**
* @param array $groupByItems
*/
public function __construct(array $groupByItems) public function __construct(array $groupByItems)
{ {
$this->groupByItems = $groupByItems; $this->groupByItems = $groupByItems;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkGroupByClause($this); return $sqlWalker->walkGroupByClause($this);

View file

@ -20,9 +20,8 @@
namespace Doctrine\ORM\Query\AST; namespace Doctrine\ORM\Query\AST;
/** /**
* Description of HavingClause * Description of HavingClause.
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,13 +30,22 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class HavingClause extends Node class HavingClause extends Node
{ {
/**
* @var ConditionalExpression
*/
public $conditionalExpression; public $conditionalExpression;
/**
* @param ConditionalExpression $conditionalExpression
*/
public function __construct($conditionalExpression) public function __construct($conditionalExpression)
{ {
$this->conditionalExpression = $conditionalExpression; $this->conditionalExpression = $conditionalExpression;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkHavingClause($this); return $sqlWalker->walkHavingClause($this);

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* IdentificationVariableDeclaration ::= RangeVariableDeclaration [IndexBy] {JoinVariableDeclaration}* * IdentificationVariableDeclaration ::= RangeVariableDeclaration [IndexBy] {JoinVariableDeclaration}*
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,10 +30,26 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class IdentificationVariableDeclaration extends Node class IdentificationVariableDeclaration extends Node
{ {
/**
* @var RangeVariableDeclaration|null
*/
public $rangeVariableDeclaration = null; public $rangeVariableDeclaration = null;
public $indexBy = null;
public $joins = array();
/**
* @var IndexBy|null
*/
public $indexBy = null;
/**
* @var array
*/
public $joins = array();
/**
* @param RangeVariableDeclaration|null $rangeVariableDecl
* @param IndexBy|null $indexBy
* @param array $joins
*/
public function __construct($rangeVariableDecl, $indexBy, array $joins) public function __construct($rangeVariableDecl, $indexBy, array $joins)
{ {
$this->rangeVariableDeclaration = $rangeVariableDecl; $this->rangeVariableDeclaration = $rangeVariableDecl;
@ -42,6 +57,9 @@ class IdentificationVariableDeclaration extends Node
$this->joins = $joins; $this->joins = $joins;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkIdentificationVariableDeclaration($this); return $sqlWalker->walkIdentificationVariableDeclaration($this);

View file

@ -21,7 +21,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* InExpression ::= StateFieldPathExpression ["NOT"] "IN" "(" (Literal {"," Literal}* | Subselect) ")" * InExpression ::= StateFieldPathExpression ["NOT"] "IN" "(" (Literal {"," Literal}* | Subselect) ")"
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -30,19 +29,39 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class InExpression extends Node class InExpression extends Node
{ {
/**
* @var bool
*/
public $not; public $not;
/**
* @var ArithmeticExpression
*/
public $expression; public $expression;
/**
* @var array
*/
public $literals = array(); public $literals = array();
/**
* @var Subselect|null
*/
public $subselect; public $subselect;
/**
* @param ArithmeticExpression $expression
*/
public function __construct($expression) public function __construct($expression)
{ {
$this->expression = $expression; $this->expression = $expression;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkInExpression($this); return $sqlWalker->walkInExpression($this);
} }
} }

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* IndexBy ::= "INDEX" "BY" SimpleStateFieldPathExpression * IndexBy ::= "INDEX" "BY" SimpleStateFieldPathExpression
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,13 +30,22 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class IndexBy extends Node class IndexBy extends Node
{ {
/**
* @var PathExpression
*/
public $simpleStateFieldPathExpression = null; public $simpleStateFieldPathExpression = null;
/**
* @param PathExpression $simpleStateFieldPathExpression
*/
public function __construct($simpleStateFieldPathExpression) public function __construct($simpleStateFieldPathExpression)
{ {
$this->simpleStateFieldPathExpression = $simpleStateFieldPathExpression; $this->simpleStateFieldPathExpression = $simpleStateFieldPathExpression;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkIndexBy($this); return $sqlWalker->walkIndexBy($this);

View file

@ -20,9 +20,8 @@
namespace Doctrine\ORM\Query\AST; namespace Doctrine\ORM\Query\AST;
/** /**
* Description of InputParameter * Description of InputParameter.
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,11 +30,20 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class InputParameter extends Node class InputParameter extends Node
{ {
/**
* @var bool
*/
public $isNamed; public $isNamed;
/**
* @var string
*/
public $name; public $name;
/** /**
* @param string $value * @param string $value
*
* @throws \Doctrine\ORM\Query\QueryException
*/ */
public function __construct($value) public function __construct($value)
{ {
@ -48,6 +56,9 @@ class InputParameter extends Node
$this->name = $param; $this->name = $param;
} }
/**
* {@inheritdoc}
*/
public function dispatch($walker) public function dispatch($walker)
{ {
return $walker->walkInputParameter($this); return $walker->walkInputParameter($this);

View file

@ -23,7 +23,6 @@ namespace Doctrine\ORM\Query\AST;
* InstanceOfExpression ::= IdentificationVariable ["NOT"] "INSTANCE" ["OF"] (InstanceOfParameter | "(" InstanceOfParameter {"," InstanceOfParameter}* ")") * InstanceOfExpression ::= IdentificationVariable ["NOT"] "INSTANCE" ["OF"] (InstanceOfParameter | "(" InstanceOfParameter {"," InstanceOfParameter}* ")")
* InstanceOfParameter ::= AbstractSchemaName | InputParameter * InstanceOfParameter ::= AbstractSchemaName | InputParameter
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -32,18 +31,34 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class InstanceOfExpression extends Node class InstanceOfExpression extends Node
{ {
/**
* @var bool
*/
public $not; public $not;
/**
* @var string
*/
public $identificationVariable; public $identificationVariable;
/**
* @var array
*/
public $value; public $value;
/**
* @param string $identVariable
*/
public function __construct($identVariable) public function __construct($identVariable)
{ {
$this->identificationVariable = $identVariable; $this->identificationVariable = $identVariable;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkInstanceOfExpression($this); return $sqlWalker->walkInstanceOfExpression($this);
} }
} }

View file

@ -35,16 +35,34 @@ class Join extends Node
const JOIN_TYPE_LEFTOUTER = 2; const JOIN_TYPE_LEFTOUTER = 2;
const JOIN_TYPE_INNER = 3; const JOIN_TYPE_INNER = 3;
/**
* @var int
*/
public $joinType = self::JOIN_TYPE_INNER; public $joinType = self::JOIN_TYPE_INNER;
/**
* @var Node|null
*/
public $joinAssociationDeclaration = null; public $joinAssociationDeclaration = null;
/**
* @var ConditionalExpression|null
*/
public $conditionalExpression = null; public $conditionalExpression = null;
/**
* @param int $joinType
* @param Node $joinAssociationDeclaration
*/
public function __construct($joinType, $joinAssociationDeclaration) public function __construct($joinType, $joinAssociationDeclaration)
{ {
$this->joinType = $joinType; $this->joinType = $joinType;
$this->joinAssociationDeclaration = $joinAssociationDeclaration; $this->joinAssociationDeclaration = $joinAssociationDeclaration;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkJoin($this); return $sqlWalker->walkJoin($this);

View file

@ -28,10 +28,26 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class JoinAssociationDeclaration extends Node class JoinAssociationDeclaration extends Node
{ {
/**
* @var JoinAssociationPathExpression
*/
public $joinAssociationPathExpression; public $joinAssociationPathExpression;
/**
* @var string
*/
public $aliasIdentificationVariable; public $aliasIdentificationVariable;
/**
* @var IndexBy|null
*/
public $indexBy; public $indexBy;
/**
* @param JoinAssociationPathExpression $joinAssociationPathExpression
* @param string $aliasIdentificationVariable
* @param IndexBy|null $indexBy
*/
public function __construct($joinAssociationPathExpression, $aliasIdentificationVariable, $indexBy) public function __construct($joinAssociationPathExpression, $aliasIdentificationVariable, $indexBy)
{ {
$this->joinAssociationPathExpression = $joinAssociationPathExpression; $this->joinAssociationPathExpression = $joinAssociationPathExpression;
@ -39,6 +55,9 @@ class JoinAssociationDeclaration extends Node
$this->indexBy = $indexBy; $this->indexBy = $indexBy;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkJoinAssociationDeclaration($this); return $sqlWalker->walkJoinAssociationDeclaration($this);

View file

@ -30,15 +30,29 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class JoinAssociationPathExpression extends Node class JoinAssociationPathExpression extends Node
{ {
/**
* @var string
*/
public $identificationVariable; public $identificationVariable;
/**
* @var string
*/
public $associationField; public $associationField;
/**
* @param string $identificationVariable
* @param string $associationField
*/
public function __construct($identificationVariable, $associationField) public function __construct($identificationVariable, $associationField)
{ {
$this->identificationVariable = $identificationVariable; $this->identificationVariable = $identificationVariable;
$this->associationField = $associationField; $this->associationField = $associationField;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkPathExpression($this); return $sqlWalker->walkPathExpression($this);

View file

@ -29,15 +29,29 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class JoinClassPathExpression extends Node class JoinClassPathExpression extends Node
{ {
/**
* @var mixed
*/
public $abstractSchemaName; public $abstractSchemaName;
/**
* @var mixed
*/
public $aliasIdentificationVariable; public $aliasIdentificationVariable;
/**
* @param mixed $abstractSchemaName
* @param mixed $aliasIdentificationVar
*/
public function __construct($abstractSchemaName, $aliasIdentificationVar) public function __construct($abstractSchemaName, $aliasIdentificationVar)
{ {
$this->abstractSchemaName = $abstractSchemaName; $this->abstractSchemaName = $abstractSchemaName;
$this->aliasIdentificationVariable = $aliasIdentificationVar; $this->aliasIdentificationVariable = $aliasIdentificationVar;
} }
/**
* {@inheritdoc}
*/
public function dispatch($walker) public function dispatch($walker)
{ {
return $walker->walkJoinPathExpression($this); return $walker->walkJoinPathExpression($this);

View file

@ -21,7 +21,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* LikeExpression ::= StringExpression ["NOT"] "LIKE" string ["ESCAPE" char] * LikeExpression ::= StringExpression ["NOT"] "LIKE" string ["ESCAPE" char]
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -30,11 +29,31 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class LikeExpression extends Node class LikeExpression extends Node
{ {
/**
* @var bool
*/
public $not; public $not;
/**
* @var Node
*/
public $stringExpression; public $stringExpression;
/**
* @var InputParameter
*/
public $stringPattern; public $stringPattern;
/**
* @var Literal|null
*/
public $escapeChar; public $escapeChar;
/**
* @param Node $stringExpression
* @param InputParameter $stringPattern
* @param Literal|null $escapeChar
*/
public function __construct($stringExpression, $stringPattern, $escapeChar = null) public function __construct($stringExpression, $stringPattern, $escapeChar = null)
{ {
$this->stringExpression = $stringExpression; $this->stringExpression = $stringExpression;
@ -42,6 +61,9 @@ class LikeExpression extends Node
$this->escapeChar = $escapeChar; $this->escapeChar = $escapeChar;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkLikeExpression($this); return $sqlWalker->walkLikeExpression($this);

View file

@ -25,17 +25,31 @@ class Literal extends Node
const BOOLEAN = 2; const BOOLEAN = 2;
const NUMERIC = 3; const NUMERIC = 3;
/**
* @var int
*/
public $type; public $type;
/**
* @var mixed
*/
public $value; public $value;
/**
* @param int $type
* @param mixed $value
*/
public function __construct($type, $value) public function __construct($type, $value)
{ {
$this->type = $type; $this->type = $type;
$this->value = $value; $this->value = $value;
} }
/**
* {@inheritdoc}
*/
public function dispatch($walker) public function dispatch($walker)
{ {
return $walker->walkLiteral($this); return $walker->walkLiteral($this);
} }
} }

View file

@ -40,8 +40,8 @@ class NewObjectExpression extends Node
public $args; public $args;
/** /**
* @param type $className * @param string $className
* @param array $args * @param array $args
*/ */
public function __construct($className, array $args) public function __construct($className, array $args)
{ {
@ -50,11 +50,10 @@ class NewObjectExpression extends Node
} }
/** /**
* @param \Doctrine\ORM\Query\SqlWalker $sqlWalker * {@inheritdoc}
* @return string
*/ */
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkNewObject($this); return $sqlWalker->walkNewObject($this);
} }
} }

View file

@ -20,9 +20,8 @@
namespace Doctrine\ORM\Query\AST; namespace Doctrine\ORM\Query\AST;
/** /**
* Abstract class of an AST node * Abstract class of an AST node.
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -36,7 +35,7 @@ abstract class Node
* *
* Implementation is not mandatory for all nodes. * Implementation is not mandatory for all nodes.
* *
* @param $walker * @param \Doctrine\ORM\Query\SqlWalker $walker
* *
* @return string * @return string
* *
@ -48,7 +47,7 @@ abstract class Node
} }
/** /**
* Dumps the AST Node into a string representation for information purpose only * Dumps the AST Node into a string representation for information purpose only.
* *
* @return string * @return string
*/ */
@ -57,6 +56,11 @@ abstract class Node
return $this->dump($this); return $this->dump($this);
} }
/**
* @param object $obj
*
* @return string
*/
public function dump($obj) public function dump($obj)
{ {
static $ident = 0; static $ident = 0;

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* NullComparisonExpression ::= (SingleValuedPathExpression | InputParameter) "IS" ["NOT"] "NULL" * NullComparisonExpression ::= (SingleValuedPathExpression | InputParameter) "IS" ["NOT"] "NULL"
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,17 +30,29 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class NullComparisonExpression extends Node class NullComparisonExpression extends Node
{ {
/**
* @var bool
*/
public $not; public $not;
/**
* @var Node
*/
public $expression; public $expression;
/**
* @param Node $expression
*/
public function __construct($expression) public function __construct($expression)
{ {
$this->expression = $expression; $this->expression = $expression;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkNullComparisonExpression($this); return $sqlWalker->walkNullComparisonExpression($this);
} }
} }

View file

@ -32,16 +32,29 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class NullIfExpression extends Node class NullIfExpression extends Node
{ {
/**
* @var mixed
*/
public $firstExpression; public $firstExpression;
/**
* @var mixed
*/
public $secondExpression; public $secondExpression;
/**
* @param mixed $firstExpression
* @param mixed $secondExpression
*/
public function __construct($firstExpression, $secondExpression) public function __construct($firstExpression, $secondExpression)
{ {
$this->firstExpression = $firstExpression; $this->firstExpression = $firstExpression;
$this->secondExpression = $secondExpression; $this->secondExpression = $secondExpression;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkNullIfExpression($this); return $sqlWalker->walkNullIfExpression($this);

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* OrderByClause ::= "ORDER" "BY" OrderByItem {"," OrderByItem}* * OrderByClause ::= "ORDER" "BY" OrderByItem {"," OrderByItem}*
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,13 +30,22 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class OrderByClause extends Node class OrderByClause extends Node
{ {
/**
* @var array
*/
public $orderByItems = array(); public $orderByItems = array();
/**
* @param array $orderByItems
*/
public function __construct(array $orderByItems) public function __construct(array $orderByItems)
{ {
$this->orderByItems = $orderByItems; $this->orderByItems = $orderByItems;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkOrderByClause($this); return $sqlWalker->walkOrderByClause($this);

View file

@ -31,24 +31,43 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class OrderByItem extends Node class OrderByItem extends Node
{ {
/**
* @var mixed
*/
public $expression; public $expression;
/**
* @var string
*/
public $type; public $type;
/**
* @param mixed $expression
*/
public function __construct($expression) public function __construct($expression)
{ {
$this->expression = $expression; $this->expression = $expression;
} }
/**
* @return bool
*/
public function isAsc() public function isAsc()
{ {
return strtoupper($this->type) == 'ASC'; return strtoupper($this->type) == 'ASC';
} }
/**
* @return bool
*/
public function isDesc() public function isDesc()
{ {
return strtoupper($this->type) == 'DESC'; return strtoupper($this->type) == 'DESC';
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkOrderByItem($this); return $sqlWalker->walkOrderByItem($this);

View file

@ -21,12 +21,23 @@ namespace Doctrine\ORM\Query\AST;
class PartialObjectExpression extends Node class PartialObjectExpression extends Node
{ {
/**
* @var string
*/
public $identificationVariable; public $identificationVariable;
/**
* @var array
*/
public $partialFieldSet; public $partialFieldSet;
/**
* @param string $identificationVariable
* @param array $partialFieldSet
*/
public function __construct($identificationVariable, array $partialFieldSet) public function __construct($identificationVariable, array $partialFieldSet)
{ {
$this->identificationVariable = $identificationVariable; $this->identificationVariable = $identificationVariable;
$this->partialFieldSet = $partialFieldSet; $this->partialFieldSet = $partialFieldSet;
} }
} }

View file

@ -39,11 +39,31 @@ class PathExpression extends Node
const TYPE_SINGLE_VALUED_ASSOCIATION = 4; const TYPE_SINGLE_VALUED_ASSOCIATION = 4;
const TYPE_STATE_FIELD = 8; const TYPE_STATE_FIELD = 8;
/**
* @var int
*/
public $type; public $type;
/**
* @var int
*/
public $expectedType; public $expectedType;
/**
* @var string
*/
public $identificationVariable; public $identificationVariable;
/**
* @var string|null
*/
public $field; public $field;
/**
* @param int $expectedType
* @param string $identificationVariable
* @param string|null $field
*/
public function __construct($expectedType, $identificationVariable, $field = null) public function __construct($expectedType, $identificationVariable, $field = null)
{ {
$this->expectedType = $expectedType; $this->expectedType = $expectedType;
@ -51,6 +71,9 @@ class PathExpression extends Node
$this->field = $field; $this->field = $field;
} }
/**
* {@inheritdoc}
*/
public function dispatch($walker) public function dispatch($walker)
{ {
return $walker->walkPathExpression($this); return $walker->walkPathExpression($this);

View file

@ -21,7 +21,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* QuantifiedExpression ::= ("ALL" | "ANY" | "SOME") "(" Subselect ")" * QuantifiedExpression ::= ("ALL" | "ANY" | "SOME") "(" Subselect ")"
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -30,35 +29,53 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class QuantifiedExpression extends Node class QuantifiedExpression extends Node
{ {
/**
* @var string
*/
public $type; public $type;
/**
* @var Subselect
*/
public $subselect; public $subselect;
/**
* @param Subselect $subselect
*/
public function __construct($subselect) public function __construct($subselect)
{ {
$this->subselect = $subselect; $this->subselect = $subselect;
} }
/**
* @return bool
*/
public function isAll() public function isAll()
{ {
return strtoupper($this->type) == 'ALL'; return strtoupper($this->type) == 'ALL';
} }
/**
* @return bool
*/
public function isAny() public function isAny()
{ {
return strtoupper($this->type) == 'ANY'; return strtoupper($this->type) == 'ANY';
} }
/**
* @return bool
*/
public function isSome() public function isSome()
{ {
return strtoupper($this->type) == 'SOME'; return strtoupper($this->type) == 'SOME';
} }
/** /**
* @override * {@inheritdoc}
*/ */
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkQuantifiedExpression($this); return $sqlWalker->walkQuantifiedExpression($this);
} }
} }

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* RangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable * RangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,15 +30,29 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class RangeVariableDeclaration extends Node class RangeVariableDeclaration extends Node
{ {
/**
* @var string
*/
public $abstractSchemaName; public $abstractSchemaName;
/**
* @var string
*/
public $aliasIdentificationVariable; public $aliasIdentificationVariable;
/**
* @param string $abstractSchemaName
* @param string $aliasIdentificationVar
*/
public function __construct($abstractSchemaName, $aliasIdentificationVar) public function __construct($abstractSchemaName, $aliasIdentificationVar)
{ {
$this->abstractSchemaName = $abstractSchemaName; $this->abstractSchemaName = $abstractSchemaName;
$this->aliasIdentificationVariable = $aliasIdentificationVar; $this->aliasIdentificationVariable = $aliasIdentificationVar;
} }
/**
* {@inheritdoc}
*/
public function dispatch($walker) public function dispatch($walker)
{ {
return $walker->walkRangeVariableDeclaration($this); return $walker->walkRangeVariableDeclaration($this);

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* SelectClause = "SELECT" ["DISTINCT"] SelectExpression {"," SelectExpression} * SelectClause = "SELECT" ["DISTINCT"] SelectExpression {"," SelectExpression}
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,15 +30,29 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class SelectClause extends Node class SelectClause extends Node
{ {
/**
* @var bool
*/
public $isDistinct; public $isDistinct;
/**
* @var array
*/
public $selectExpressions = array(); public $selectExpressions = array();
/**
* @param array $selectExpressions
* @param bool $isDistinct
*/
public function __construct(array $selectExpressions, $isDistinct) public function __construct(array $selectExpressions, $isDistinct)
{ {
$this->isDistinct = $isDistinct; $this->isDistinct = $isDistinct;
$this->selectExpressions = $selectExpressions; $this->selectExpressions = $selectExpressions;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkSelectClause($this); return $sqlWalker->walkSelectClause($this);

View file

@ -23,7 +23,6 @@ namespace Doctrine\ORM\Query\AST;
* SelectExpression ::= IdentificationVariable ["." "*"] | StateFieldPathExpression | * SelectExpression ::= IdentificationVariable ["." "*"] | StateFieldPathExpression |
* (AggregateExpression | "(" Subselect ")") [["AS"] ["HIDDEN"] FieldAliasIdentificationVariable] * (AggregateExpression | "(" Subselect ")") [["AS"] ["HIDDEN"] FieldAliasIdentificationVariable]
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -32,10 +31,26 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class SelectExpression extends Node class SelectExpression extends Node
{ {
/**
* @var mixed
*/
public $expression; public $expression;
/**
* @var string|null
*/
public $fieldIdentificationVariable; public $fieldIdentificationVariable;
/**
* @var bool
*/
public $hiddenAliasResultVariable; public $hiddenAliasResultVariable;
/**
* @param mixed $expression
* @param string|null $fieldIdentificationVariable
* @param bool $hiddenAliasResultVariable
*/
public function __construct($expression, $fieldIdentificationVariable, $hiddenAliasResultVariable = false) public function __construct($expression, $fieldIdentificationVariable, $hiddenAliasResultVariable = false)
{ {
$this->expression = $expression; $this->expression = $expression;
@ -43,6 +58,9 @@ class SelectExpression extends Node
$this->hiddenAliasResultVariable = $hiddenAliasResultVariable; $this->hiddenAliasResultVariable = $hiddenAliasResultVariable;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkSelectExpression($this); return $sqlWalker->walkSelectExpression($this);

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* SelectStatement = SelectClause FromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause] * SelectStatement = SelectClause FromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause]
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,18 +30,49 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class SelectStatement extends Node class SelectStatement extends Node
{ {
/**
* @var SelectClause
*/
public $selectClause; public $selectClause;
/**
* @var FromClause
*/
public $fromClause; public $fromClause;
/**
* @var WhereClause|null
*/
public $whereClause; public $whereClause;
/**
* @var GroupByClause|null
*/
public $groupByClause; public $groupByClause;
/**
* @var HavingClause|null
*/
public $havingClause; public $havingClause;
/**
* @var OrderByClause|null
*/
public $orderByClause; public $orderByClause;
public function __construct($selectClause, $fromClause) { /**
* @param SelectClause $selectClause
* @param FromClause $fromClause
*/
public function __construct($selectClause, $fromClause)
{
$this->selectClause = $selectClause; $this->selectClause = $selectClause;
$this->fromClause = $fromClause; $this->fromClause = $fromClause;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkSelectStatement($this); return $sqlWalker->walkSelectStatement($this);

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* SimpleArithmeticExpression ::= ArithmeticTerm {("+" | "-") ArithmeticTerm}* * SimpleArithmeticExpression ::= ArithmeticTerm {("+" | "-") ArithmeticTerm}*
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,13 +30,22 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class SimpleArithmeticExpression extends Node class SimpleArithmeticExpression extends Node
{ {
/**
* @var array
*/
public $arithmeticTerms = array(); public $arithmeticTerms = array();
/**
* @param array $arithmeticTerms
*/
public function __construct(array $arithmeticTerms) public function __construct(array $arithmeticTerms)
{ {
$this->arithmeticTerms = $arithmeticTerms; $this->arithmeticTerms = $arithmeticTerms;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkSimpleArithmeticExpression($this); return $sqlWalker->walkSimpleArithmeticExpression($this);

View file

@ -32,10 +32,26 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class SimpleCaseExpression extends Node class SimpleCaseExpression extends Node
{ {
/**
* @var PathExpression
*/
public $caseOperand = null; public $caseOperand = null;
/**
* @var array
*/
public $simpleWhenClauses = array(); public $simpleWhenClauses = array();
/**
* @var mixed
*/
public $elseScalarExpression = null; public $elseScalarExpression = null;
/**
* @param PathExpression $caseOperand
* @param array $simpleWhenClauses
* @param mixed $elseScalarExpression
*/
public function __construct($caseOperand, array $simpleWhenClauses, $elseScalarExpression) public function __construct($caseOperand, array $simpleWhenClauses, $elseScalarExpression)
{ {
$this->caseOperand = $caseOperand; $this->caseOperand = $caseOperand;
@ -43,6 +59,9 @@ class SimpleCaseExpression extends Node
$this->elseScalarExpression = $elseScalarExpression; $this->elseScalarExpression = $elseScalarExpression;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkSimpleCaseExpression($this); return $sqlWalker->walkSimpleCaseExpression($this);

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* SimpleSelectClause ::= "SELECT" ["DISTINCT"] SimpleSelectExpression * SimpleSelectClause ::= "SELECT" ["DISTINCT"] SimpleSelectExpression
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,15 +30,29 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class SimpleSelectClause extends Node class SimpleSelectClause extends Node
{ {
/**
* @var bool
*/
public $isDistinct = false; public $isDistinct = false;
/**
* @var SimpleSelectExpression
*/
public $simpleSelectExpression; public $simpleSelectExpression;
/**
* @param SimpleSelectExpression $simpleSelectExpression
* @param bool $isDistinct
*/
public function __construct($simpleSelectExpression, $isDistinct) public function __construct($simpleSelectExpression, $isDistinct)
{ {
$this->simpleSelectExpression = $simpleSelectExpression; $this->simpleSelectExpression = $simpleSelectExpression;
$this->isDistinct = $isDistinct; $this->isDistinct = $isDistinct;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkSimpleSelectClause($this); return $sqlWalker->walkSimpleSelectClause($this);

View file

@ -23,7 +23,6 @@ namespace Doctrine\ORM\Query\AST;
* SimpleSelectExpression ::= StateFieldPathExpression | IdentificationVariable * SimpleSelectExpression ::= StateFieldPathExpression | IdentificationVariable
* | (AggregateExpression [["AS"] FieldAliasIdentificationVariable]) * | (AggregateExpression [["AS"] FieldAliasIdentificationVariable])
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -32,14 +31,27 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class SimpleSelectExpression extends Node class SimpleSelectExpression extends Node
{ {
/**
* @var Node
*/
public $expression; public $expression;
/**
* @var string
*/
public $fieldIdentificationVariable; public $fieldIdentificationVariable;
/**
* @param Node $expression
*/
public function __construct($expression) public function __construct($expression)
{ {
$this->expression = $expression; $this->expression = $expression;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkSimpleSelectExpression($this); return $sqlWalker->walkSimpleSelectExpression($this);

View file

@ -32,15 +32,29 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class SimpleWhenClause extends Node class SimpleWhenClause extends Node
{ {
/**
* @var mixed
*/
public $caseScalarExpression = null; public $caseScalarExpression = null;
/**
* @var mixed
*/
public $thenScalarExpression = null; public $thenScalarExpression = null;
/**
* @param mixed $caseScalarExpression
* @param mixed $thenScalarExpression
*/
public function __construct($caseScalarExpression, $thenScalarExpression) public function __construct($caseScalarExpression, $thenScalarExpression)
{ {
$this->caseScalarExpression = $caseScalarExpression; $this->caseScalarExpression = $caseScalarExpression;
$this->thenScalarExpression = $thenScalarExpression; $this->thenScalarExpression = $thenScalarExpression;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkWhenClauseExpression($this); return $sqlWalker->walkWhenClauseExpression($this);

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* Subselect ::= SimpleSelectClause SubselectFromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause] * Subselect ::= SimpleSelectClause SubselectFromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause]
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,19 +30,49 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class Subselect extends Node class Subselect extends Node
{ {
/**
* @var SimpleSelectClause
*/
public $simpleSelectClause; public $simpleSelectClause;
/**
* @var SubselectFromClause
*/
public $subselectFromClause; public $subselectFromClause;
/**
* @var WhereClause|null
*/
public $whereClause; public $whereClause;
/**
* @var GroupByClause|null
*/
public $groupByClause; public $groupByClause;
/**
* @var HavingClause|null
*/
public $havingClause; public $havingClause;
/**
* @var OrderByClause|null
*/
public $orderByClause; public $orderByClause;
/**
* @param SimpleSelectClause $simpleSelectClause
* @param SubselectFromClause $subselectFromClause
*/
public function __construct($simpleSelectClause, $subselectFromClause) public function __construct($simpleSelectClause, $subselectFromClause)
{ {
$this->simpleSelectClause = $simpleSelectClause; $this->simpleSelectClause = $simpleSelectClause;
$this->subselectFromClause = $subselectFromClause; $this->subselectFromClause = $subselectFromClause;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkSubselect($this); return $sqlWalker->walkSubselect($this);

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* SubselectFromClause ::= "FROM" SubselectIdentificationVariableDeclaration {"," SubselectIdentificationVariableDeclaration}* * SubselectFromClause ::= "FROM" SubselectIdentificationVariableDeclaration {"," SubselectIdentificationVariableDeclaration}*
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,13 +30,22 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class SubselectFromClause extends Node class SubselectFromClause extends Node
{ {
/**
* @var array
*/
public $identificationVariableDeclarations = array(); public $identificationVariableDeclarations = array();
/**
* @param array $identificationVariableDeclarations
*/
public function __construct(array $identificationVariableDeclarations) public function __construct(array $identificationVariableDeclarations)
{ {
$this->identificationVariableDeclarations = $identificationVariableDeclarations; $this->identificationVariableDeclarations = $identificationVariableDeclarations;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkSubselectFromClause($this); return $sqlWalker->walkSubselectFromClause($this);

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* UpdateClause ::= "UPDATE" AbstractSchemaName [["AS"] AliasIdentificationVariable] "SET" UpdateItem {"," UpdateItem}* * UpdateClause ::= "UPDATE" AbstractSchemaName [["AS"] AliasIdentificationVariable] "SET" UpdateItem {"," UpdateItem}*
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,19 +30,36 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class UpdateClause extends Node class UpdateClause extends Node
{ {
/**
* @var string
*/
public $abstractSchemaName; public $abstractSchemaName;
/**
* @var string
*/
public $aliasIdentificationVariable; public $aliasIdentificationVariable;
/**
* @var array
*/
public $updateItems = array(); public $updateItems = array();
/**
* @param string $abstractSchemaName
* @param array $updateItems
*/
public function __construct($abstractSchemaName, array $updateItems) public function __construct($abstractSchemaName, array $updateItems)
{ {
$this->abstractSchemaName = $abstractSchemaName; $this->abstractSchemaName = $abstractSchemaName;
$this->updateItems = $updateItems; $this->updateItems = $updateItems;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkUpdateClause($this); return $sqlWalker->walkUpdateClause($this);
} }
} }

View file

@ -24,7 +24,6 @@ namespace Doctrine\ORM\Query\AST;
* NewValue ::= SimpleArithmeticExpression | StringPrimary | DatetimePrimary | BooleanPrimary | * NewValue ::= SimpleArithmeticExpression | StringPrimary | DatetimePrimary | BooleanPrimary |
* EnumPrimary | SimpleEntityExpression | "NULL" * EnumPrimary | SimpleEntityExpression | "NULL"
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -33,18 +32,31 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class UpdateItem extends Node class UpdateItem extends Node
{ {
/**
* @var PathExpression
*/
public $pathExpression; public $pathExpression;
/**
* @var InputParameter|ArithmeticExpression|null
*/
public $newValue; public $newValue;
/**
* @param PathExpression $pathExpression
* @param InputParameter|ArithmeticExpression|null $newValue
*/
public function __construct($pathExpression, $newValue) public function __construct($pathExpression, $newValue)
{ {
$this->pathExpression = $pathExpression; $this->pathExpression = $pathExpression;
$this->newValue = $newValue; $this->newValue = $newValue;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkUpdateItem($this); return $sqlWalker->walkUpdateItem($this);
} }
} }

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* UpdateStatement = UpdateClause [WhereClause] * UpdateStatement = UpdateClause [WhereClause]
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,14 +30,27 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class UpdateStatement extends Node class UpdateStatement extends Node
{ {
/**
* @var UpdateClause
*/
public $updateClause; public $updateClause;
/**
* @var WhereClause|null
*/
public $whereClause; public $whereClause;
/**
* @param UpdateClause $updateClause
*/
public function __construct($updateClause) public function __construct($updateClause)
{ {
$this->updateClause = $updateClause; $this->updateClause = $updateClause;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkUpdateStatement($this); return $sqlWalker->walkUpdateStatement($this);

View file

@ -32,15 +32,29 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class WhenClause extends Node class WhenClause extends Node
{ {
/**
* @var ConditionalExpression
*/
public $caseConditionExpression = null; public $caseConditionExpression = null;
/**
* @var mixed
*/
public $thenScalarExpression = null; public $thenScalarExpression = null;
/**
* @param ConditionalExpression $caseConditionExpression
* @param mixed $thenScalarExpression
*/
public function __construct($caseConditionExpression, $thenScalarExpression) public function __construct($caseConditionExpression, $thenScalarExpression)
{ {
$this->caseConditionExpression = $caseConditionExpression; $this->caseConditionExpression = $caseConditionExpression;
$this->thenScalarExpression = $thenScalarExpression; $this->thenScalarExpression = $thenScalarExpression;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkWhenClauseExpression($this); return $sqlWalker->walkWhenClauseExpression($this);

View file

@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST;
/** /**
* WhereClause ::= "WHERE" ConditionalExpression * WhereClause ::= "WHERE" ConditionalExpression
* *
*
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
@ -31,13 +30,22 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class WhereClause extends Node class WhereClause extends Node
{ {
/**
* @var ConditionalExpression
*/
public $conditionalExpression; public $conditionalExpression;
/**
* @param ConditionalExpression $conditionalExpression
*/
public function __construct($conditionalExpression) public function __construct($conditionalExpression)
{ {
$this->conditionalExpression = $conditionalExpression; $this->conditionalExpression = $conditionalExpression;
} }
/**
* {@inheritdoc}
*/
public function dispatch($sqlWalker) public function dispatch($sqlWalker)
{ {
return $sqlWalker->walkWhereClause($this); return $sqlWalker->walkWhereClause($this);