From 98ac6b5fecde73ee18c9b813c88ecb75f4b706db Mon Sep 17 00:00:00 2001 From: Benjamin Morel Date: Thu, 13 Dec 2012 11:52:19 +0000 Subject: [PATCH] Fixed documentation for Doctrine\ORM\Query\AST --- lib/Doctrine/ORM/Query/AST/ASTException.php | 7 +++- .../ORM/Query/AST/AggregateExpression.php | 28 ++++++++++++--- .../ORM/Query/AST/ArithmeticExpression.php | 17 +++++++++- .../ORM/Query/AST/ArithmeticFactor.php | 20 +++++++++-- lib/Doctrine/ORM/Query/AST/ArithmeticTerm.php | 10 +++++- .../ORM/Query/AST/BetweenExpression.php | 27 +++++++++++++-- .../ORM/Query/AST/CoalesceExpression.php | 10 +++++- .../Query/AST/CollectionMemberExpression.php | 16 ++++++++- .../ORM/Query/AST/ComparisonExpression.php | 20 ++++++++++- .../ORM/Query/AST/ConditionalExpression.php | 10 +++++- .../ORM/Query/AST/ConditionalFactor.php | 14 +++++++- .../ORM/Query/AST/ConditionalPrimary.php | 17 +++++++++- .../ORM/Query/AST/ConditionalTerm.php | 10 +++++- lib/Doctrine/ORM/Query/AST/DeleteClause.php | 15 ++++++-- .../ORM/Query/AST/DeleteStatement.php | 14 +++++++- .../EmptyCollectionComparisonExpression.php | 15 ++++++-- .../ORM/Query/AST/ExistsExpression.php | 15 ++++++-- lib/Doctrine/ORM/Query/AST/FromClause.php | 9 +++++ .../ORM/Query/AST/GeneralCaseExpression.php | 14 ++++++++ lib/Doctrine/ORM/Query/AST/GroupByClause.php | 12 +++++-- lib/Doctrine/ORM/Query/AST/HavingClause.php | 12 +++++-- .../AST/IdentificationVariableDeclaration.php | 24 +++++++++++-- lib/Doctrine/ORM/Query/AST/InExpression.php | 23 +++++++++++-- lib/Doctrine/ORM/Query/AST/IndexBy.php | 10 +++++- lib/Doctrine/ORM/Query/AST/InputParameter.php | 15 ++++++-- .../ORM/Query/AST/InstanceOfExpression.php | 19 +++++++++-- lib/Doctrine/ORM/Query/AST/Join.php | 18 ++++++++++ .../Query/AST/JoinAssociationDeclaration.php | 19 +++++++++++ .../AST/JoinAssociationPathExpression.php | 14 ++++++++ .../ORM/Query/AST/JoinClassPathExpression.php | 14 ++++++++ lib/Doctrine/ORM/Query/AST/LikeExpression.php | 24 ++++++++++++- lib/Doctrine/ORM/Query/AST/Literal.php | 16 ++++++++- .../ORM/Query/AST/NewObjectExpression.php | 9 +++-- lib/Doctrine/ORM/Query/AST/Node.php | 12 ++++--- .../Query/AST/NullComparisonExpression.php | 15 ++++++-- .../ORM/Query/AST/NullIfExpression.php | 13 +++++++ lib/Doctrine/ORM/Query/AST/OrderByClause.php | 10 +++++- lib/Doctrine/ORM/Query/AST/OrderByItem.php | 19 +++++++++++ .../ORM/Query/AST/PartialObjectExpression.php | 13 ++++++- lib/Doctrine/ORM/Query/AST/PathExpression.php | 23 +++++++++++++ .../ORM/Query/AST/QuantifiedExpression.php | 23 +++++++++++-- .../Query/AST/RangeVariableDeclaration.php | 15 +++++++- lib/Doctrine/ORM/Query/AST/SelectClause.php | 15 +++++++- .../ORM/Query/AST/SelectExpression.php | 20 ++++++++++- .../ORM/Query/AST/SelectStatement.php | 34 +++++++++++++++++-- .../Query/AST/SimpleArithmeticExpression.php | 10 +++++- .../ORM/Query/AST/SimpleCaseExpression.php | 19 +++++++++++ .../ORM/Query/AST/SimpleSelectClause.php | 15 +++++++- .../ORM/Query/AST/SimpleSelectExpression.php | 14 +++++++- .../ORM/Query/AST/SimpleWhenClause.php | 14 ++++++++ lib/Doctrine/ORM/Query/AST/Subselect.php | 31 ++++++++++++++++- .../ORM/Query/AST/SubselectFromClause.php | 10 +++++- lib/Doctrine/ORM/Query/AST/UpdateClause.php | 20 +++++++++-- lib/Doctrine/ORM/Query/AST/UpdateItem.php | 16 +++++++-- .../ORM/Query/AST/UpdateStatement.php | 14 +++++++- lib/Doctrine/ORM/Query/AST/WhenClause.php | 14 ++++++++ lib/Doctrine/ORM/Query/AST/WhereClause.php | 10 +++++- 57 files changed, 841 insertions(+), 75 deletions(-) diff --git a/lib/Doctrine/ORM/Query/AST/ASTException.php b/lib/Doctrine/ORM/Query/AST/ASTException.php index 4633322a1..b8f931b45 100644 --- a/lib/Doctrine/ORM/Query/AST/ASTException.php +++ b/lib/Doctrine/ORM/Query/AST/ASTException.php @@ -26,8 +26,13 @@ use Doctrine\ORM\Query\QueryException; */ class ASTException extends QueryException { + /** + * @param Node $node + * + * @return ASTException + */ public static function noDispatchForNode($node) { return new self("Double-dispatch for node " . get_class($node) . " is not supported."); } -} \ No newline at end of file +} diff --git a/lib/Doctrine/ORM/Query/AST/AggregateExpression.php b/lib/Doctrine/ORM/Query/AST/AggregateExpression.php index ec91ada24..0966d902b 100644 --- a/lib/Doctrine/ORM/Query/AST/AggregateExpression.php +++ b/lib/Doctrine/ORM/Query/AST/AggregateExpression.php @@ -20,9 +20,8 @@ namespace Doctrine\ORM\Query\AST; /** - * Description of AggregateExpression + * Description of AggregateExpression. * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,10 +30,28 @@ namespace Doctrine\ORM\Query\AST; */ class AggregateExpression extends Node { + /** + * @var string + */ 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) { $this->functionName = $functionName; @@ -42,6 +59,9 @@ class AggregateExpression extends Node $this->isDistinct = $isDistinct; } + /** + * {@inheritdoc} + */ public function dispatch($walker) { return $walker->walkAggregateExpression($this); diff --git a/lib/Doctrine/ORM/Query/AST/ArithmeticExpression.php b/lib/Doctrine/ORM/Query/AST/ArithmeticExpression.php index 55a6b0602..b586cba30 100644 --- a/lib/Doctrine/ORM/Query/AST/ArithmeticExpression.php +++ b/lib/Doctrine/ORM/Query/AST/ArithmeticExpression.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * ArithmeticExpression ::= SimpleArithmeticExpression | "(" Subselect ")" * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,19 +30,35 @@ namespace Doctrine\ORM\Query\AST; */ class ArithmeticExpression extends Node { + /** + * @var SimpleArithmeticExpression|null + */ public $simpleArithmeticExpression; + + /** + * @var Subselect|null + */ public $subselect; + /** + * @return bool + */ public function isSimpleArithmeticExpression() { return (bool) $this->simpleArithmeticExpression; } + /** + * @return bool + */ public function isSubselect() { return (bool) $this->subselect; } + /** + * {@inheritdoc} + */ public function dispatch($walker) { return $walker->walkArithmeticExpression($this); diff --git a/lib/Doctrine/ORM/Query/AST/ArithmeticFactor.php b/lib/Doctrine/ORM/Query/AST/ArithmeticFactor.php index 8d595efc4..3120466fd 100644 --- a/lib/Doctrine/ORM/Query/AST/ArithmeticFactor.php +++ b/lib/Doctrine/ORM/Query/AST/ArithmeticFactor.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * ArithmeticFactor ::= [("+" | "-")] ArithmeticPrimary * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -32,31 +31,46 @@ namespace Doctrine\ORM\Query\AST; class ArithmeticFactor extends Node { /** - * @var ArithmeticPrimary + * @var mixed */ 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; + /** + * @param mixed $arithmeticPrimary + * @param null|bool $sign + */ public function __construct($arithmeticPrimary, $sign = null) { $this->arithmeticPrimary = $arithmeticPrimary; $this->sign = $sign; } + /** + * @return bool + */ public function isPositiveSigned() { return $this->sign === true; } + /** + * @return bool + */ public function isNegativeSigned() { return $this->sign === false; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkArithmeticFactor($this); diff --git a/lib/Doctrine/ORM/Query/AST/ArithmeticTerm.php b/lib/Doctrine/ORM/Query/AST/ArithmeticTerm.php index ced25e99f..e08ae7fbb 100644 --- a/lib/Doctrine/ORM/Query/AST/ArithmeticTerm.php +++ b/lib/Doctrine/ORM/Query/AST/ArithmeticTerm.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * ArithmeticTerm ::= ArithmeticFactor {("*" | "/") ArithmeticFactor}* * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,13 +30,22 @@ namespace Doctrine\ORM\Query\AST; */ class ArithmeticTerm extends Node { + /** + * @var array + */ public $arithmeticFactors; + /** + * @param array $arithmeticFactors + */ public function __construct(array $arithmeticFactors) { $this->arithmeticFactors = $arithmeticFactors; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkArithmeticTerm($this); diff --git a/lib/Doctrine/ORM/Query/AST/BetweenExpression.php b/lib/Doctrine/ORM/Query/AST/BetweenExpression.php index 83ba6cafd..1e31fd1a5 100644 --- a/lib/Doctrine/ORM/Query/AST/BetweenExpression.php +++ b/lib/Doctrine/ORM/Query/AST/BetweenExpression.php @@ -20,9 +20,8 @@ namespace Doctrine\ORM\Query\AST; /** - * Description of BetweenExpression + * Description of BetweenExpression. * - * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,11 +30,31 @@ namespace Doctrine\ORM\Query\AST; */ class BetweenExpression extends Node { + /** + * @var ArithmeticExpression + */ public $expression; + + /** + * @var ArithmeticExpression + */ public $leftBetweenExpression; + + /** + * @var ArithmeticExpression + */ public $rightBetweenExpression; + + /** + * @var bool + */ public $not; + /** + * @param ArithmeticExpression $expr + * @param ArithmeticExpression $leftExpr + * @param ArithmeticExpression $rightExpr + */ public function __construct($expr, $leftExpr, $rightExpr) { $this->expression = $expr; @@ -43,9 +62,11 @@ class BetweenExpression extends Node $this->rightBetweenExpression = $rightExpr; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkBetweenExpression($this); } } - diff --git a/lib/Doctrine/ORM/Query/AST/CoalesceExpression.php b/lib/Doctrine/ORM/Query/AST/CoalesceExpression.php index 731d45eb8..194f9ace5 100644 --- a/lib/Doctrine/ORM/Query/AST/CoalesceExpression.php +++ b/lib/Doctrine/ORM/Query/AST/CoalesceExpression.php @@ -32,14 +32,22 @@ namespace Doctrine\ORM\Query\AST; */ class CoalesceExpression extends Node { + /** + * @var array + */ public $scalarExpressions = array(); - + /** + * @param array $scalarExpressions + */ public function __construct(array $scalarExpressions) { $this->scalarExpressions = $scalarExpressions; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkCoalesceExpression($this); diff --git a/lib/Doctrine/ORM/Query/AST/CollectionMemberExpression.php b/lib/Doctrine/ORM/Query/AST/CollectionMemberExpression.php index b8c7b53a0..70989a267 100644 --- a/lib/Doctrine/ORM/Query/AST/CollectionMemberExpression.php +++ b/lib/Doctrine/ORM/Query/AST/CollectionMemberExpression.php @@ -32,18 +32,32 @@ namespace Doctrine\ORM\Query\AST; class CollectionMemberExpression extends Node { public $entityExpression; + + /** + * @var PathExpression + */ public $collectionValuedPathExpression; + + /** + * @var bool + */ public $not; + /** + * @param mixed $entityExpr + * @param PathExpression $collValuedPathExpr + */ public function __construct($entityExpr, $collValuedPathExpr) { $this->entityExpression = $entityExpr; $this->collectionValuedPathExpression = $collValuedPathExpr; } + /** + * {@inheritdoc} + */ public function dispatch($walker) { return $walker->walkCollectionMemberExpression($this); } } - diff --git a/lib/Doctrine/ORM/Query/AST/ComparisonExpression.php b/lib/Doctrine/ORM/Query/AST/ComparisonExpression.php index d3105a1f3..05583920d 100644 --- a/lib/Doctrine/ORM/Query/AST/ComparisonExpression.php +++ b/lib/Doctrine/ORM/Query/AST/ComparisonExpression.php @@ -27,7 +27,6 @@ namespace Doctrine\ORM\Query\AST; * DatetimeExpression ComparisonOperator (DatetimeExpression | QuantifiedExpression) | * EntityExpression ("=" | "<>") (EntityExpression | QuantifiedExpression) * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -36,10 +35,26 @@ namespace Doctrine\ORM\Query\AST; */ class ComparisonExpression extends Node { + /** + * @var Node + */ public $leftExpression; + + /** + * @var Node + */ public $rightExpression; + + /** + * @var string + */ public $operator; + /** + * @param Node $leftExpr + * @param string $operator + * @param Node $rightExpr + */ public function __construct($leftExpr, $operator, $rightExpr) { $this->leftExpression = $leftExpr; @@ -47,6 +62,9 @@ class ComparisonExpression extends Node $this->operator = $operator; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkComparisonExpression($this); diff --git a/lib/Doctrine/ORM/Query/AST/ConditionalExpression.php b/lib/Doctrine/ORM/Query/AST/ConditionalExpression.php index c302aa204..62c7b2bca 100644 --- a/lib/Doctrine/ORM/Query/AST/ConditionalExpression.php +++ b/lib/Doctrine/ORM/Query/AST/ConditionalExpression.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * ConditionalExpression ::= ConditionalTerm {"OR" ConditionalTerm}* * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,13 +30,22 @@ namespace Doctrine\ORM\Query\AST; */ class ConditionalExpression extends Node { + /** + * @var array + */ public $conditionalTerms = array(); + /** + * @param array $conditionalTerms + */ public function __construct(array $conditionalTerms) { $this->conditionalTerms = $conditionalTerms; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkConditionalExpression($this); diff --git a/lib/Doctrine/ORM/Query/AST/ConditionalFactor.php b/lib/Doctrine/ORM/Query/AST/ConditionalFactor.php index b17089b78..7c89faa42 100644 --- a/lib/Doctrine/ORM/Query/AST/ConditionalFactor.php +++ b/lib/Doctrine/ORM/Query/AST/ConditionalFactor.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * ConditionalFactor ::= ["NOT"] ConditionalPrimary * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,14 +30,27 @@ namespace Doctrine\ORM\Query\AST; */ class ConditionalFactor extends Node { + /** + * @var bool + */ public $not = false; + + /** + * @var ConditionalPrimary + */ public $conditionalPrimary; + /** + * @param ConditionalPrimary $conditionalPrimary + */ public function __construct($conditionalPrimary) { $this->conditionalPrimary = $conditionalPrimary; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkConditionalFactor($this); diff --git a/lib/Doctrine/ORM/Query/AST/ConditionalPrimary.php b/lib/Doctrine/ORM/Query/AST/ConditionalPrimary.php index 8a7c0b7c6..1eed41dce 100644 --- a/lib/Doctrine/ORM/Query/AST/ConditionalPrimary.php +++ b/lib/Doctrine/ORM/Query/AST/ConditionalPrimary.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * ConditionalPrimary ::= SimpleConditionalExpression | "(" ConditionalExpression ")" * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,19 +30,35 @@ namespace Doctrine\ORM\Query\AST; */ class ConditionalPrimary extends Node { + /** + * @var Node|null + */ public $simpleConditionalExpression; + + /** + * @var ConditionalExpression|null + */ public $conditionalExpression; + /** + * @return bool + */ public function isSimpleConditionalExpression() { return (bool) $this->simpleConditionalExpression; } + /** + * @return bool + */ public function isConditionalExpression() { return (bool) $this->conditionalExpression; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkConditionalPrimary($this); diff --git a/lib/Doctrine/ORM/Query/AST/ConditionalTerm.php b/lib/Doctrine/ORM/Query/AST/ConditionalTerm.php index d24defc1a..bb92db119 100644 --- a/lib/Doctrine/ORM/Query/AST/ConditionalTerm.php +++ b/lib/Doctrine/ORM/Query/AST/ConditionalTerm.php @@ -21,7 +21,6 @@ namespace Doctrine\ORM\Query\AST; /** * ConditionalTerm ::= ConditionalFactor {"AND" ConditionalFactor}* * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -30,13 +29,22 @@ namespace Doctrine\ORM\Query\AST; */ class ConditionalTerm extends Node { + /** + * @var array + */ public $conditionalFactors = array(); + /** + * @param array $conditionalFactors + */ public function __construct(array $conditionalFactors) { $this->conditionalFactors = $conditionalFactors; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkConditionalTerm($this); diff --git a/lib/Doctrine/ORM/Query/AST/DeleteClause.php b/lib/Doctrine/ORM/Query/AST/DeleteClause.php index a05e52f06..8ca35c677 100644 --- a/lib/Doctrine/ORM/Query/AST/DeleteClause.php +++ b/lib/Doctrine/ORM/Query/AST/DeleteClause.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * DeleteClause ::= "DELETE" ["FROM"] AbstractSchemaName [["AS"] AliasIdentificationVariable] * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,17 +30,29 @@ namespace Doctrine\ORM\Query\AST; */ class DeleteClause extends Node { + /** + * @var string + */ public $abstractSchemaName; + + /** + * @var string + */ public $aliasIdentificationVariable; + /** + * @param string $abstractSchemaName + */ public function __construct($abstractSchemaName) { $this->abstractSchemaName = $abstractSchemaName; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkDeleteClause($this); } } - diff --git a/lib/Doctrine/ORM/Query/AST/DeleteStatement.php b/lib/Doctrine/ORM/Query/AST/DeleteStatement.php index f6e8cb31c..da6859b86 100644 --- a/lib/Doctrine/ORM/Query/AST/DeleteStatement.php +++ b/lib/Doctrine/ORM/Query/AST/DeleteStatement.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * DeleteStatement = DeleteClause [WhereClause] * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,14 +30,27 @@ namespace Doctrine\ORM\Query\AST; */ class DeleteStatement extends Node { + /** + * @var DeleteClause + */ public $deleteClause; + + /** + * @var WhereClause|null + */ public $whereClause; + /** + * @param DeleteClause $deleteClause + */ public function __construct($deleteClause) { $this->deleteClause = $deleteClause; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkDeleteStatement($this); diff --git a/lib/Doctrine/ORM/Query/AST/EmptyCollectionComparisonExpression.php b/lib/Doctrine/ORM/Query/AST/EmptyCollectionComparisonExpression.php index fbe504c5d..bd978af04 100644 --- a/lib/Doctrine/ORM/Query/AST/EmptyCollectionComparisonExpression.php +++ b/lib/Doctrine/ORM/Query/AST/EmptyCollectionComparisonExpression.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * EmptyCollectionComparisonExpression ::= CollectionValuedPathExpression "IS" ["NOT"] "EMPTY" * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,17 +30,29 @@ namespace Doctrine\ORM\Query\AST; */ class EmptyCollectionComparisonExpression extends Node { + /** + * @var PathExpression + */ public $expression; + + /** + * @var bool + */ public $not; + /** + * @param PathExpression $expression + */ public function __construct($expression) { $this->expression = $expression; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkEmptyCollectionComparisonExpression($this); } } - diff --git a/lib/Doctrine/ORM/Query/AST/ExistsExpression.php b/lib/Doctrine/ORM/Query/AST/ExistsExpression.php index 94ee55d13..c53a10775 100644 --- a/lib/Doctrine/ORM/Query/AST/ExistsExpression.php +++ b/lib/Doctrine/ORM/Query/AST/ExistsExpression.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * ExistsExpression ::= ["NOT"] "EXISTS" "(" Subselect ")" * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,17 +30,29 @@ namespace Doctrine\ORM\Query\AST; */ class ExistsExpression extends Node { + /** + * @var bool + */ public $not; + + /** + * @var Subselect + */ public $subselect; + /** + * @param Subselect $subselect + */ public function __construct($subselect) { $this->subselect = $subselect; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkExistsExpression($this); } } - diff --git a/lib/Doctrine/ORM/Query/AST/FromClause.php b/lib/Doctrine/ORM/Query/AST/FromClause.php index 32c7a7380..b1d8dfe6b 100644 --- a/lib/Doctrine/ORM/Query/AST/FromClause.php +++ b/lib/Doctrine/ORM/Query/AST/FromClause.php @@ -31,13 +31,22 @@ namespace Doctrine\ORM\Query\AST; */ class FromClause extends Node { + /** + * @var array + */ public $identificationVariableDeclarations = array(); + /** + * @param array $identificationVariableDeclarations + */ public function __construct(array $identificationVariableDeclarations) { $this->identificationVariableDeclarations = $identificationVariableDeclarations; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkFromClause($this); diff --git a/lib/Doctrine/ORM/Query/AST/GeneralCaseExpression.php b/lib/Doctrine/ORM/Query/AST/GeneralCaseExpression.php index ee4b41831..a74eed599 100644 --- a/lib/Doctrine/ORM/Query/AST/GeneralCaseExpression.php +++ b/lib/Doctrine/ORM/Query/AST/GeneralCaseExpression.php @@ -32,15 +32,29 @@ namespace Doctrine\ORM\Query\AST; */ class GeneralCaseExpression extends Node { + /** + * @var array + */ public $whenClauses = array(); + + /** + * @var mixed + */ public $elseScalarExpression = null; + /** + * @param array $whenClauses + * @param mixed $elseScalarExpression + */ public function __construct(array $whenClauses, $elseScalarExpression) { $this->whenClauses = $whenClauses; $this->elseScalarExpression = $elseScalarExpression; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkGeneralCaseExpression($this); diff --git a/lib/Doctrine/ORM/Query/AST/GroupByClause.php b/lib/Doctrine/ORM/Query/AST/GroupByClause.php index 06350f02d..c05fa5863 100644 --- a/lib/Doctrine/ORM/Query/AST/GroupByClause.php +++ b/lib/Doctrine/ORM/Query/AST/GroupByClause.php @@ -20,9 +20,8 @@ namespace Doctrine\ORM\Query\AST; /** - * Description of GroupByClause + * Description of GroupByClause. * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,13 +30,22 @@ namespace Doctrine\ORM\Query\AST; */ class GroupByClause extends Node { + /** + * @var array + */ public $groupByItems = array(); + /** + * @param array $groupByItems + */ public function __construct(array $groupByItems) { $this->groupByItems = $groupByItems; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkGroupByClause($this); diff --git a/lib/Doctrine/ORM/Query/AST/HavingClause.php b/lib/Doctrine/ORM/Query/AST/HavingClause.php index 971e919bc..1d369fff6 100644 --- a/lib/Doctrine/ORM/Query/AST/HavingClause.php +++ b/lib/Doctrine/ORM/Query/AST/HavingClause.php @@ -20,9 +20,8 @@ namespace Doctrine\ORM\Query\AST; /** - * Description of HavingClause + * Description of HavingClause. * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,13 +30,22 @@ namespace Doctrine\ORM\Query\AST; */ class HavingClause extends Node { + /** + * @var ConditionalExpression + */ public $conditionalExpression; + /** + * @param ConditionalExpression $conditionalExpression + */ public function __construct($conditionalExpression) { $this->conditionalExpression = $conditionalExpression; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkHavingClause($this); diff --git a/lib/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php b/lib/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php index 6bbdaaad6..a8f7f6d35 100644 --- a/lib/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php +++ b/lib/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * IdentificationVariableDeclaration ::= RangeVariableDeclaration [IndexBy] {JoinVariableDeclaration}* * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,10 +30,26 @@ namespace Doctrine\ORM\Query\AST; */ class IdentificationVariableDeclaration extends Node { + /** + * @var 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) { $this->rangeVariableDeclaration = $rangeVariableDecl; @@ -42,6 +57,9 @@ class IdentificationVariableDeclaration extends Node $this->joins = $joins; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkIdentificationVariableDeclaration($this); diff --git a/lib/Doctrine/ORM/Query/AST/InExpression.php b/lib/Doctrine/ORM/Query/AST/InExpression.php index 39501a406..9d0a8b54e 100644 --- a/lib/Doctrine/ORM/Query/AST/InExpression.php +++ b/lib/Doctrine/ORM/Query/AST/InExpression.php @@ -21,7 +21,6 @@ namespace Doctrine\ORM\Query\AST; /** * InExpression ::= StateFieldPathExpression ["NOT"] "IN" "(" (Literal {"," Literal}* | Subselect) ")" * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -30,19 +29,39 @@ namespace Doctrine\ORM\Query\AST; */ class InExpression extends Node { + /** + * @var bool + */ public $not; + + /** + * @var ArithmeticExpression + */ public $expression; + + /** + * @var array + */ public $literals = array(); + + /** + * @var Subselect|null + */ public $subselect; + /** + * @param ArithmeticExpression $expression + */ public function __construct($expression) { $this->expression = $expression; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkInExpression($this); } } - diff --git a/lib/Doctrine/ORM/Query/AST/IndexBy.php b/lib/Doctrine/ORM/Query/AST/IndexBy.php index 08e9e6a04..c7874b70a 100644 --- a/lib/Doctrine/ORM/Query/AST/IndexBy.php +++ b/lib/Doctrine/ORM/Query/AST/IndexBy.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * IndexBy ::= "INDEX" "BY" SimpleStateFieldPathExpression * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,13 +30,22 @@ namespace Doctrine\ORM\Query\AST; */ class IndexBy extends Node { + /** + * @var PathExpression + */ public $simpleStateFieldPathExpression = null; + /** + * @param PathExpression $simpleStateFieldPathExpression + */ public function __construct($simpleStateFieldPathExpression) { $this->simpleStateFieldPathExpression = $simpleStateFieldPathExpression; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkIndexBy($this); diff --git a/lib/Doctrine/ORM/Query/AST/InputParameter.php b/lib/Doctrine/ORM/Query/AST/InputParameter.php index d575df718..cf50140be 100644 --- a/lib/Doctrine/ORM/Query/AST/InputParameter.php +++ b/lib/Doctrine/ORM/Query/AST/InputParameter.php @@ -20,9 +20,8 @@ namespace Doctrine\ORM\Query\AST; /** - * Description of InputParameter + * Description of InputParameter. * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,11 +30,20 @@ namespace Doctrine\ORM\Query\AST; */ class InputParameter extends Node { + /** + * @var bool + */ public $isNamed; + + /** + * @var string + */ public $name; /** * @param string $value + * + * @throws \Doctrine\ORM\Query\QueryException */ public function __construct($value) { @@ -48,6 +56,9 @@ class InputParameter extends Node $this->name = $param; } + /** + * {@inheritdoc} + */ public function dispatch($walker) { return $walker->walkInputParameter($this); diff --git a/lib/Doctrine/ORM/Query/AST/InstanceOfExpression.php b/lib/Doctrine/ORM/Query/AST/InstanceOfExpression.php index c022cd686..c1fd65b8e 100644 --- a/lib/Doctrine/ORM/Query/AST/InstanceOfExpression.php +++ b/lib/Doctrine/ORM/Query/AST/InstanceOfExpression.php @@ -23,7 +23,6 @@ namespace Doctrine\ORM\Query\AST; * InstanceOfExpression ::= IdentificationVariable ["NOT"] "INSTANCE" ["OF"] (InstanceOfParameter | "(" InstanceOfParameter {"," InstanceOfParameter}* ")") * InstanceOfParameter ::= AbstractSchemaName | InputParameter * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -32,18 +31,34 @@ namespace Doctrine\ORM\Query\AST; */ class InstanceOfExpression extends Node { + /** + * @var bool + */ public $not; + + /** + * @var string + */ public $identificationVariable; + + /** + * @var array + */ public $value; + /** + * @param string $identVariable + */ public function __construct($identVariable) { $this->identificationVariable = $identVariable; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkInstanceOfExpression($this); } } - diff --git a/lib/Doctrine/ORM/Query/AST/Join.php b/lib/Doctrine/ORM/Query/AST/Join.php index 6724f9e1d..5c203aa0b 100644 --- a/lib/Doctrine/ORM/Query/AST/Join.php +++ b/lib/Doctrine/ORM/Query/AST/Join.php @@ -35,16 +35,34 @@ class Join extends Node const JOIN_TYPE_LEFTOUTER = 2; const JOIN_TYPE_INNER = 3; + /** + * @var int + */ public $joinType = self::JOIN_TYPE_INNER; + + /** + * @var Node|null + */ public $joinAssociationDeclaration = null; + + /** + * @var ConditionalExpression|null + */ public $conditionalExpression = null; + /** + * @param int $joinType + * @param Node $joinAssociationDeclaration + */ public function __construct($joinType, $joinAssociationDeclaration) { $this->joinType = $joinType; $this->joinAssociationDeclaration = $joinAssociationDeclaration; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkJoin($this); diff --git a/lib/Doctrine/ORM/Query/AST/JoinAssociationDeclaration.php b/lib/Doctrine/ORM/Query/AST/JoinAssociationDeclaration.php index 8e97353ea..a33900a6d 100644 --- a/lib/Doctrine/ORM/Query/AST/JoinAssociationDeclaration.php +++ b/lib/Doctrine/ORM/Query/AST/JoinAssociationDeclaration.php @@ -28,10 +28,26 @@ namespace Doctrine\ORM\Query\AST; */ class JoinAssociationDeclaration extends Node { + /** + * @var JoinAssociationPathExpression + */ public $joinAssociationPathExpression; + + /** + * @var string + */ public $aliasIdentificationVariable; + + /** + * @var IndexBy|null + */ public $indexBy; + /** + * @param JoinAssociationPathExpression $joinAssociationPathExpression + * @param string $aliasIdentificationVariable + * @param IndexBy|null $indexBy + */ public function __construct($joinAssociationPathExpression, $aliasIdentificationVariable, $indexBy) { $this->joinAssociationPathExpression = $joinAssociationPathExpression; @@ -39,6 +55,9 @@ class JoinAssociationDeclaration extends Node $this->indexBy = $indexBy; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkJoinAssociationDeclaration($this); diff --git a/lib/Doctrine/ORM/Query/AST/JoinAssociationPathExpression.php b/lib/Doctrine/ORM/Query/AST/JoinAssociationPathExpression.php index 57bd05277..946bbb15b 100644 --- a/lib/Doctrine/ORM/Query/AST/JoinAssociationPathExpression.php +++ b/lib/Doctrine/ORM/Query/AST/JoinAssociationPathExpression.php @@ -30,15 +30,29 @@ namespace Doctrine\ORM\Query\AST; */ class JoinAssociationPathExpression extends Node { + /** + * @var string + */ public $identificationVariable; + + /** + * @var string + */ public $associationField; + /** + * @param string $identificationVariable + * @param string $associationField + */ public function __construct($identificationVariable, $associationField) { $this->identificationVariable = $identificationVariable; $this->associationField = $associationField; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkPathExpression($this); diff --git a/lib/Doctrine/ORM/Query/AST/JoinClassPathExpression.php b/lib/Doctrine/ORM/Query/AST/JoinClassPathExpression.php index a6bafea21..1c67cb9c4 100644 --- a/lib/Doctrine/ORM/Query/AST/JoinClassPathExpression.php +++ b/lib/Doctrine/ORM/Query/AST/JoinClassPathExpression.php @@ -29,15 +29,29 @@ namespace Doctrine\ORM\Query\AST; */ class JoinClassPathExpression extends Node { + /** + * @var mixed + */ public $abstractSchemaName; + + /** + * @var mixed + */ public $aliasIdentificationVariable; + /** + * @param mixed $abstractSchemaName + * @param mixed $aliasIdentificationVar + */ public function __construct($abstractSchemaName, $aliasIdentificationVar) { $this->abstractSchemaName = $abstractSchemaName; $this->aliasIdentificationVariable = $aliasIdentificationVar; } + /** + * {@inheritdoc} + */ public function dispatch($walker) { return $walker->walkJoinPathExpression($this); diff --git a/lib/Doctrine/ORM/Query/AST/LikeExpression.php b/lib/Doctrine/ORM/Query/AST/LikeExpression.php index 68f8635b0..e320c51c8 100644 --- a/lib/Doctrine/ORM/Query/AST/LikeExpression.php +++ b/lib/Doctrine/ORM/Query/AST/LikeExpression.php @@ -21,7 +21,6 @@ namespace Doctrine\ORM\Query\AST; /** * LikeExpression ::= StringExpression ["NOT"] "LIKE" string ["ESCAPE" char] * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -30,11 +29,31 @@ namespace Doctrine\ORM\Query\AST; */ class LikeExpression extends Node { + /** + * @var bool + */ public $not; + + /** + * @var Node + */ public $stringExpression; + + /** + * @var InputParameter + */ public $stringPattern; + + /** + * @var Literal|null + */ public $escapeChar; + /** + * @param Node $stringExpression + * @param InputParameter $stringPattern + * @param Literal|null $escapeChar + */ public function __construct($stringExpression, $stringPattern, $escapeChar = null) { $this->stringExpression = $stringExpression; @@ -42,6 +61,9 @@ class LikeExpression extends Node $this->escapeChar = $escapeChar; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkLikeExpression($this); diff --git a/lib/Doctrine/ORM/Query/AST/Literal.php b/lib/Doctrine/ORM/Query/AST/Literal.php index 26337cbda..43d71add0 100644 --- a/lib/Doctrine/ORM/Query/AST/Literal.php +++ b/lib/Doctrine/ORM/Query/AST/Literal.php @@ -25,17 +25,31 @@ class Literal extends Node const BOOLEAN = 2; const NUMERIC = 3; + /** + * @var int + */ public $type; + + /** + * @var mixed + */ public $value; + /** + * @param int $type + * @param mixed $value + */ public function __construct($type, $value) { $this->type = $type; $this->value = $value; } + /** + * {@inheritdoc} + */ public function dispatch($walker) { return $walker->walkLiteral($this); } -} \ No newline at end of file +} diff --git a/lib/Doctrine/ORM/Query/AST/NewObjectExpression.php b/lib/Doctrine/ORM/Query/AST/NewObjectExpression.php index caf7a80b7..2603cf81b 100644 --- a/lib/Doctrine/ORM/Query/AST/NewObjectExpression.php +++ b/lib/Doctrine/ORM/Query/AST/NewObjectExpression.php @@ -40,8 +40,8 @@ class NewObjectExpression extends Node public $args; /** - * @param type $className - * @param array $args + * @param string $className + * @param array $args */ public function __construct($className, array $args) { @@ -50,11 +50,10 @@ class NewObjectExpression extends Node } /** - * @param \Doctrine\ORM\Query\SqlWalker $sqlWalker - * @return string + * {@inheritdoc} */ public function dispatch($sqlWalker) { return $sqlWalker->walkNewObject($this); } -} \ No newline at end of file +} diff --git a/lib/Doctrine/ORM/Query/AST/Node.php b/lib/Doctrine/ORM/Query/AST/Node.php index 25347e577..a257dc2d7 100644 --- a/lib/Doctrine/ORM/Query/AST/Node.php +++ b/lib/Doctrine/ORM/Query/AST/Node.php @@ -20,9 +20,8 @@ namespace Doctrine\ORM\Query\AST; /** - * Abstract class of an AST node + * Abstract class of an AST node. * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -36,7 +35,7 @@ abstract class Node * * Implementation is not mandatory for all nodes. * - * @param $walker + * @param \Doctrine\ORM\Query\SqlWalker $walker * * @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 */ @@ -57,6 +56,11 @@ abstract class Node return $this->dump($this); } + /** + * @param object $obj + * + * @return string + */ public function dump($obj) { static $ident = 0; diff --git a/lib/Doctrine/ORM/Query/AST/NullComparisonExpression.php b/lib/Doctrine/ORM/Query/AST/NullComparisonExpression.php index d0fb8bfd9..84a199784 100644 --- a/lib/Doctrine/ORM/Query/AST/NullComparisonExpression.php +++ b/lib/Doctrine/ORM/Query/AST/NullComparisonExpression.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * NullComparisonExpression ::= (SingleValuedPathExpression | InputParameter) "IS" ["NOT"] "NULL" * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,17 +30,29 @@ namespace Doctrine\ORM\Query\AST; */ class NullComparisonExpression extends Node { + /** + * @var bool + */ public $not; + + /** + * @var Node + */ public $expression; + /** + * @param Node $expression + */ public function __construct($expression) { $this->expression = $expression; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkNullComparisonExpression($this); } } - diff --git a/lib/Doctrine/ORM/Query/AST/NullIfExpression.php b/lib/Doctrine/ORM/Query/AST/NullIfExpression.php index 2c85ddd90..e33bc72b1 100644 --- a/lib/Doctrine/ORM/Query/AST/NullIfExpression.php +++ b/lib/Doctrine/ORM/Query/AST/NullIfExpression.php @@ -32,16 +32,29 @@ namespace Doctrine\ORM\Query\AST; */ class NullIfExpression extends Node { + /** + * @var mixed + */ public $firstExpression; + /** + * @var mixed + */ public $secondExpression; + /** + * @param mixed $firstExpression + * @param mixed $secondExpression + */ public function __construct($firstExpression, $secondExpression) { $this->firstExpression = $firstExpression; $this->secondExpression = $secondExpression; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkNullIfExpression($this); diff --git a/lib/Doctrine/ORM/Query/AST/OrderByClause.php b/lib/Doctrine/ORM/Query/AST/OrderByClause.php index 311a9edce..75d16c731 100644 --- a/lib/Doctrine/ORM/Query/AST/OrderByClause.php +++ b/lib/Doctrine/ORM/Query/AST/OrderByClause.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * OrderByClause ::= "ORDER" "BY" OrderByItem {"," OrderByItem}* * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,13 +30,22 @@ namespace Doctrine\ORM\Query\AST; */ class OrderByClause extends Node { + /** + * @var array + */ public $orderByItems = array(); + /** + * @param array $orderByItems + */ public function __construct(array $orderByItems) { $this->orderByItems = $orderByItems; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkOrderByClause($this); diff --git a/lib/Doctrine/ORM/Query/AST/OrderByItem.php b/lib/Doctrine/ORM/Query/AST/OrderByItem.php index 5d48077ed..bf3288a7b 100644 --- a/lib/Doctrine/ORM/Query/AST/OrderByItem.php +++ b/lib/Doctrine/ORM/Query/AST/OrderByItem.php @@ -31,24 +31,43 @@ namespace Doctrine\ORM\Query\AST; */ class OrderByItem extends Node { + /** + * @var mixed + */ public $expression; + + /** + * @var string + */ public $type; + /** + * @param mixed $expression + */ public function __construct($expression) { $this->expression = $expression; } + /** + * @return bool + */ public function isAsc() { return strtoupper($this->type) == 'ASC'; } + /** + * @return bool + */ public function isDesc() { return strtoupper($this->type) == 'DESC'; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkOrderByItem($this); diff --git a/lib/Doctrine/ORM/Query/AST/PartialObjectExpression.php b/lib/Doctrine/ORM/Query/AST/PartialObjectExpression.php index 8a0e0d04e..e4ffe79b2 100644 --- a/lib/Doctrine/ORM/Query/AST/PartialObjectExpression.php +++ b/lib/Doctrine/ORM/Query/AST/PartialObjectExpression.php @@ -21,12 +21,23 @@ namespace Doctrine\ORM\Query\AST; class PartialObjectExpression extends Node { + /** + * @var string + */ public $identificationVariable; + + /** + * @var array + */ public $partialFieldSet; + /** + * @param string $identificationVariable + * @param array $partialFieldSet + */ public function __construct($identificationVariable, array $partialFieldSet) { $this->identificationVariable = $identificationVariable; $this->partialFieldSet = $partialFieldSet; } -} \ No newline at end of file +} diff --git a/lib/Doctrine/ORM/Query/AST/PathExpression.php b/lib/Doctrine/ORM/Query/AST/PathExpression.php index 1b2774203..37674b6fd 100644 --- a/lib/Doctrine/ORM/Query/AST/PathExpression.php +++ b/lib/Doctrine/ORM/Query/AST/PathExpression.php @@ -39,11 +39,31 @@ class PathExpression extends Node const TYPE_SINGLE_VALUED_ASSOCIATION = 4; const TYPE_STATE_FIELD = 8; + /** + * @var int + */ public $type; + + /** + * @var int + */ public $expectedType; + + /** + * @var string + */ public $identificationVariable; + + /** + * @var string|null + */ public $field; + /** + * @param int $expectedType + * @param string $identificationVariable + * @param string|null $field + */ public function __construct($expectedType, $identificationVariable, $field = null) { $this->expectedType = $expectedType; @@ -51,6 +71,9 @@ class PathExpression extends Node $this->field = $field; } + /** + * {@inheritdoc} + */ public function dispatch($walker) { return $walker->walkPathExpression($this); diff --git a/lib/Doctrine/ORM/Query/AST/QuantifiedExpression.php b/lib/Doctrine/ORM/Query/AST/QuantifiedExpression.php index 64a764e90..15be95234 100644 --- a/lib/Doctrine/ORM/Query/AST/QuantifiedExpression.php +++ b/lib/Doctrine/ORM/Query/AST/QuantifiedExpression.php @@ -21,7 +21,6 @@ namespace Doctrine\ORM\Query\AST; /** * QuantifiedExpression ::= ("ALL" | "ANY" | "SOME") "(" Subselect ")" * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -30,35 +29,53 @@ namespace Doctrine\ORM\Query\AST; */ class QuantifiedExpression extends Node { + /** + * @var string + */ public $type; + + /** + * @var Subselect + */ public $subselect; + /** + * @param Subselect $subselect + */ public function __construct($subselect) { $this->subselect = $subselect; } + /** + * @return bool + */ public function isAll() { return strtoupper($this->type) == 'ALL'; } + /** + * @return bool + */ public function isAny() { return strtoupper($this->type) == 'ANY'; } + /** + * @return bool + */ public function isSome() { return strtoupper($this->type) == 'SOME'; } /** - * @override + * {@inheritdoc} */ public function dispatch($sqlWalker) { return $sqlWalker->walkQuantifiedExpression($this); } } - diff --git a/lib/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php b/lib/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php index facd0bb3b..72a2ea9aa 100644 --- a/lib/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php +++ b/lib/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * RangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,15 +30,29 @@ namespace Doctrine\ORM\Query\AST; */ class RangeVariableDeclaration extends Node { + /** + * @var string + */ public $abstractSchemaName; + + /** + * @var string + */ public $aliasIdentificationVariable; + /** + * @param string $abstractSchemaName + * @param string $aliasIdentificationVar + */ public function __construct($abstractSchemaName, $aliasIdentificationVar) { $this->abstractSchemaName = $abstractSchemaName; $this->aliasIdentificationVariable = $aliasIdentificationVar; } + /** + * {@inheritdoc} + */ public function dispatch($walker) { return $walker->walkRangeVariableDeclaration($this); diff --git a/lib/Doctrine/ORM/Query/AST/SelectClause.php b/lib/Doctrine/ORM/Query/AST/SelectClause.php index be76a4fb6..1df143677 100644 --- a/lib/Doctrine/ORM/Query/AST/SelectClause.php +++ b/lib/Doctrine/ORM/Query/AST/SelectClause.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * SelectClause = "SELECT" ["DISTINCT"] SelectExpression {"," SelectExpression} * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,15 +30,29 @@ namespace Doctrine\ORM\Query\AST; */ class SelectClause extends Node { + /** + * @var bool + */ public $isDistinct; + + /** + * @var array + */ public $selectExpressions = array(); + /** + * @param array $selectExpressions + * @param bool $isDistinct + */ public function __construct(array $selectExpressions, $isDistinct) { $this->isDistinct = $isDistinct; $this->selectExpressions = $selectExpressions; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkSelectClause($this); diff --git a/lib/Doctrine/ORM/Query/AST/SelectExpression.php b/lib/Doctrine/ORM/Query/AST/SelectExpression.php index 14ca85083..418701399 100644 --- a/lib/Doctrine/ORM/Query/AST/SelectExpression.php +++ b/lib/Doctrine/ORM/Query/AST/SelectExpression.php @@ -23,7 +23,6 @@ namespace Doctrine\ORM\Query\AST; * SelectExpression ::= IdentificationVariable ["." "*"] | StateFieldPathExpression | * (AggregateExpression | "(" Subselect ")") [["AS"] ["HIDDEN"] FieldAliasIdentificationVariable] * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -32,10 +31,26 @@ namespace Doctrine\ORM\Query\AST; */ class SelectExpression extends Node { + /** + * @var mixed + */ public $expression; + + /** + * @var string|null + */ public $fieldIdentificationVariable; + + /** + * @var bool + */ public $hiddenAliasResultVariable; + /** + * @param mixed $expression + * @param string|null $fieldIdentificationVariable + * @param bool $hiddenAliasResultVariable + */ public function __construct($expression, $fieldIdentificationVariable, $hiddenAliasResultVariable = false) { $this->expression = $expression; @@ -43,6 +58,9 @@ class SelectExpression extends Node $this->hiddenAliasResultVariable = $hiddenAliasResultVariable; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkSelectExpression($this); diff --git a/lib/Doctrine/ORM/Query/AST/SelectStatement.php b/lib/Doctrine/ORM/Query/AST/SelectStatement.php index d91d26f1a..d84f7258a 100644 --- a/lib/Doctrine/ORM/Query/AST/SelectStatement.php +++ b/lib/Doctrine/ORM/Query/AST/SelectStatement.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * SelectStatement = SelectClause FromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause] * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,18 +30,49 @@ namespace Doctrine\ORM\Query\AST; */ class SelectStatement extends Node { + /** + * @var SelectClause + */ public $selectClause; + + /** + * @var FromClause + */ public $fromClause; + + /** + * @var WhereClause|null + */ public $whereClause; + + /** + * @var GroupByClause|null + */ public $groupByClause; + + /** + * @var HavingClause|null + */ public $havingClause; + + /** + * @var OrderByClause|null + */ public $orderByClause; - public function __construct($selectClause, $fromClause) { + /** + * @param SelectClause $selectClause + * @param FromClause $fromClause + */ + public function __construct($selectClause, $fromClause) + { $this->selectClause = $selectClause; $this->fromClause = $fromClause; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkSelectStatement($this); diff --git a/lib/Doctrine/ORM/Query/AST/SimpleArithmeticExpression.php b/lib/Doctrine/ORM/Query/AST/SimpleArithmeticExpression.php index 8d91c9b0b..9bd485045 100644 --- a/lib/Doctrine/ORM/Query/AST/SimpleArithmeticExpression.php +++ b/lib/Doctrine/ORM/Query/AST/SimpleArithmeticExpression.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * SimpleArithmeticExpression ::= ArithmeticTerm {("+" | "-") ArithmeticTerm}* * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,13 +30,22 @@ namespace Doctrine\ORM\Query\AST; */ class SimpleArithmeticExpression extends Node { + /** + * @var array + */ public $arithmeticTerms = array(); + /** + * @param array $arithmeticTerms + */ public function __construct(array $arithmeticTerms) { $this->arithmeticTerms = $arithmeticTerms; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkSimpleArithmeticExpression($this); diff --git a/lib/Doctrine/ORM/Query/AST/SimpleCaseExpression.php b/lib/Doctrine/ORM/Query/AST/SimpleCaseExpression.php index bd593ee57..5272f3962 100644 --- a/lib/Doctrine/ORM/Query/AST/SimpleCaseExpression.php +++ b/lib/Doctrine/ORM/Query/AST/SimpleCaseExpression.php @@ -32,10 +32,26 @@ namespace Doctrine\ORM\Query\AST; */ class SimpleCaseExpression extends Node { + /** + * @var PathExpression + */ public $caseOperand = null; + + /** + * @var array + */ public $simpleWhenClauses = array(); + + /** + * @var mixed + */ public $elseScalarExpression = null; + /** + * @param PathExpression $caseOperand + * @param array $simpleWhenClauses + * @param mixed $elseScalarExpression + */ public function __construct($caseOperand, array $simpleWhenClauses, $elseScalarExpression) { $this->caseOperand = $caseOperand; @@ -43,6 +59,9 @@ class SimpleCaseExpression extends Node $this->elseScalarExpression = $elseScalarExpression; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkSimpleCaseExpression($this); diff --git a/lib/Doctrine/ORM/Query/AST/SimpleSelectClause.php b/lib/Doctrine/ORM/Query/AST/SimpleSelectClause.php index 95a619878..92361da45 100644 --- a/lib/Doctrine/ORM/Query/AST/SimpleSelectClause.php +++ b/lib/Doctrine/ORM/Query/AST/SimpleSelectClause.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * SimpleSelectClause ::= "SELECT" ["DISTINCT"] SimpleSelectExpression * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,15 +30,29 @@ namespace Doctrine\ORM\Query\AST; */ class SimpleSelectClause extends Node { + /** + * @var bool + */ public $isDistinct = false; + + /** + * @var SimpleSelectExpression + */ public $simpleSelectExpression; + /** + * @param SimpleSelectExpression $simpleSelectExpression + * @param bool $isDistinct + */ public function __construct($simpleSelectExpression, $isDistinct) { $this->simpleSelectExpression = $simpleSelectExpression; $this->isDistinct = $isDistinct; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkSimpleSelectClause($this); diff --git a/lib/Doctrine/ORM/Query/AST/SimpleSelectExpression.php b/lib/Doctrine/ORM/Query/AST/SimpleSelectExpression.php index 25e927e2b..e556835ed 100644 --- a/lib/Doctrine/ORM/Query/AST/SimpleSelectExpression.php +++ b/lib/Doctrine/ORM/Query/AST/SimpleSelectExpression.php @@ -23,7 +23,6 @@ namespace Doctrine\ORM\Query\AST; * SimpleSelectExpression ::= StateFieldPathExpression | IdentificationVariable * | (AggregateExpression [["AS"] FieldAliasIdentificationVariable]) * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -32,14 +31,27 @@ namespace Doctrine\ORM\Query\AST; */ class SimpleSelectExpression extends Node { + /** + * @var Node + */ public $expression; + + /** + * @var string + */ public $fieldIdentificationVariable; + /** + * @param Node $expression + */ public function __construct($expression) { $this->expression = $expression; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkSimpleSelectExpression($this); diff --git a/lib/Doctrine/ORM/Query/AST/SimpleWhenClause.php b/lib/Doctrine/ORM/Query/AST/SimpleWhenClause.php index fabe44961..4f60881d4 100644 --- a/lib/Doctrine/ORM/Query/AST/SimpleWhenClause.php +++ b/lib/Doctrine/ORM/Query/AST/SimpleWhenClause.php @@ -32,15 +32,29 @@ namespace Doctrine\ORM\Query\AST; */ class SimpleWhenClause extends Node { + /** + * @var mixed + */ public $caseScalarExpression = null; + + /** + * @var mixed + */ public $thenScalarExpression = null; + /** + * @param mixed $caseScalarExpression + * @param mixed $thenScalarExpression + */ public function __construct($caseScalarExpression, $thenScalarExpression) { $this->caseScalarExpression = $caseScalarExpression; $this->thenScalarExpression = $thenScalarExpression; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkWhenClauseExpression($this); diff --git a/lib/Doctrine/ORM/Query/AST/Subselect.php b/lib/Doctrine/ORM/Query/AST/Subselect.php index 46c0e9678..ce08266f0 100644 --- a/lib/Doctrine/ORM/Query/AST/Subselect.php +++ b/lib/Doctrine/ORM/Query/AST/Subselect.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * Subselect ::= SimpleSelectClause SubselectFromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause] * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,19 +30,49 @@ namespace Doctrine\ORM\Query\AST; */ class Subselect extends Node { + /** + * @var SimpleSelectClause + */ public $simpleSelectClause; + + /** + * @var SubselectFromClause + */ public $subselectFromClause; + + /** + * @var WhereClause|null + */ public $whereClause; + + /** + * @var GroupByClause|null + */ public $groupByClause; + + /** + * @var HavingClause|null + */ public $havingClause; + + /** + * @var OrderByClause|null + */ public $orderByClause; + /** + * @param SimpleSelectClause $simpleSelectClause + * @param SubselectFromClause $subselectFromClause + */ public function __construct($simpleSelectClause, $subselectFromClause) { $this->simpleSelectClause = $simpleSelectClause; $this->subselectFromClause = $subselectFromClause; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkSubselect($this); diff --git a/lib/Doctrine/ORM/Query/AST/SubselectFromClause.php b/lib/Doctrine/ORM/Query/AST/SubselectFromClause.php index 3a6b54779..8d009fcfd 100644 --- a/lib/Doctrine/ORM/Query/AST/SubselectFromClause.php +++ b/lib/Doctrine/ORM/Query/AST/SubselectFromClause.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * SubselectFromClause ::= "FROM" SubselectIdentificationVariableDeclaration {"," SubselectIdentificationVariableDeclaration}* * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,13 +30,22 @@ namespace Doctrine\ORM\Query\AST; */ class SubselectFromClause extends Node { + /** + * @var array + */ public $identificationVariableDeclarations = array(); + /** + * @param array $identificationVariableDeclarations + */ public function __construct(array $identificationVariableDeclarations) { $this->identificationVariableDeclarations = $identificationVariableDeclarations; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkSubselectFromClause($this); diff --git a/lib/Doctrine/ORM/Query/AST/UpdateClause.php b/lib/Doctrine/ORM/Query/AST/UpdateClause.php index 4188cf58e..430ed14eb 100644 --- a/lib/Doctrine/ORM/Query/AST/UpdateClause.php +++ b/lib/Doctrine/ORM/Query/AST/UpdateClause.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * UpdateClause ::= "UPDATE" AbstractSchemaName [["AS"] AliasIdentificationVariable] "SET" UpdateItem {"," UpdateItem}* * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,19 +30,36 @@ namespace Doctrine\ORM\Query\AST; */ class UpdateClause extends Node { + /** + * @var string + */ public $abstractSchemaName; + + /** + * @var string + */ public $aliasIdentificationVariable; + + /** + * @var array + */ public $updateItems = array(); + /** + * @param string $abstractSchemaName + * @param array $updateItems + */ public function __construct($abstractSchemaName, array $updateItems) { $this->abstractSchemaName = $abstractSchemaName; $this->updateItems = $updateItems; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkUpdateClause($this); } } - diff --git a/lib/Doctrine/ORM/Query/AST/UpdateItem.php b/lib/Doctrine/ORM/Query/AST/UpdateItem.php index 2a13391f3..f1a288cae 100644 --- a/lib/Doctrine/ORM/Query/AST/UpdateItem.php +++ b/lib/Doctrine/ORM/Query/AST/UpdateItem.php @@ -24,7 +24,6 @@ namespace Doctrine\ORM\Query\AST; * NewValue ::= SimpleArithmeticExpression | StringPrimary | DatetimePrimary | BooleanPrimary | * EnumPrimary | SimpleEntityExpression | "NULL" * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -33,18 +32,31 @@ namespace Doctrine\ORM\Query\AST; */ class UpdateItem extends Node { + /** + * @var PathExpression + */ public $pathExpression; + + /** + * @var InputParameter|ArithmeticExpression|null + */ public $newValue; + /** + * @param PathExpression $pathExpression + * @param InputParameter|ArithmeticExpression|null $newValue + */ public function __construct($pathExpression, $newValue) { $this->pathExpression = $pathExpression; $this->newValue = $newValue; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkUpdateItem($this); } } - diff --git a/lib/Doctrine/ORM/Query/AST/UpdateStatement.php b/lib/Doctrine/ORM/Query/AST/UpdateStatement.php index decae96e9..c578efef4 100644 --- a/lib/Doctrine/ORM/Query/AST/UpdateStatement.php +++ b/lib/Doctrine/ORM/Query/AST/UpdateStatement.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * UpdateStatement = UpdateClause [WhereClause] * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,14 +30,27 @@ namespace Doctrine\ORM\Query\AST; */ class UpdateStatement extends Node { + /** + * @var UpdateClause + */ public $updateClause; + + /** + * @var WhereClause|null + */ public $whereClause; + /** + * @param UpdateClause $updateClause + */ public function __construct($updateClause) { $this->updateClause = $updateClause; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkUpdateStatement($this); diff --git a/lib/Doctrine/ORM/Query/AST/WhenClause.php b/lib/Doctrine/ORM/Query/AST/WhenClause.php index ca91f575f..01c0330f4 100644 --- a/lib/Doctrine/ORM/Query/AST/WhenClause.php +++ b/lib/Doctrine/ORM/Query/AST/WhenClause.php @@ -32,15 +32,29 @@ namespace Doctrine\ORM\Query\AST; */ class WhenClause extends Node { + /** + * @var ConditionalExpression + */ public $caseConditionExpression = null; + + /** + * @var mixed + */ public $thenScalarExpression = null; + /** + * @param ConditionalExpression $caseConditionExpression + * @param mixed $thenScalarExpression + */ public function __construct($caseConditionExpression, $thenScalarExpression) { $this->caseConditionExpression = $caseConditionExpression; $this->thenScalarExpression = $thenScalarExpression; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkWhenClauseExpression($this); diff --git a/lib/Doctrine/ORM/Query/AST/WhereClause.php b/lib/Doctrine/ORM/Query/AST/WhereClause.php index 0b9f16024..e6597752f 100644 --- a/lib/Doctrine/ORM/Query/AST/WhereClause.php +++ b/lib/Doctrine/ORM/Query/AST/WhereClause.php @@ -22,7 +22,6 @@ namespace Doctrine\ORM\Query\AST; /** * WhereClause ::= "WHERE" ConditionalExpression * - * * @link www.doctrine-project.org * @since 2.0 * @author Guilherme Blanco @@ -31,13 +30,22 @@ namespace Doctrine\ORM\Query\AST; */ class WhereClause extends Node { + /** + * @var ConditionalExpression + */ public $conditionalExpression; + /** + * @param ConditionalExpression $conditionalExpression + */ public function __construct($conditionalExpression) { $this->conditionalExpression = $conditionalExpression; } + /** + * {@inheritdoc} + */ public function dispatch($sqlWalker) { return $sqlWalker->walkWhereClause($this);