Skip to content

Commit

Permalink
Fixed documentation for Doctrine\ORM\Query\Expr and Doctrine\ORM\Quer…
Browse files Browse the repository at this point in the history
…y\Filter
  • Loading branch information
Benjamin Morel committed Dec 13, 2012
1 parent d435780 commit 28966e2
Show file tree
Hide file tree
Showing 14 changed files with 61 additions and 63 deletions.
3 changes: 1 addition & 2 deletions lib/Doctrine/ORM/Query/Expr/Andx.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
namespace Doctrine\ORM\Query\Expr;

/**
* Expression class for building DQL and parts
* Expression class for building DQL and parts.
*
*
* @link www.doctrine-project.org
* @since 2.0
* @author Guilherme Blanco <[email protected]>
Expand Down
15 changes: 9 additions & 6 deletions lib/Doctrine/ORM/Query/Expr/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
namespace Doctrine\ORM\Query\Expr;

/**
* Abstract base Expr class for building DQL parts
* Abstract base Expr class for building DQL parts.
*
*
* @link www.doctrine-project.org
* @since 2.0
* @author Guilherme Blanco <[email protected]>
Expand Down Expand Up @@ -65,8 +64,9 @@ public function __construct($args = array())
}

/**
* @param array $args
* @return Base
* @param array $args
*
* @return Base
*/
public function addMultiple($args = array())
{
Expand All @@ -78,8 +78,11 @@ public function addMultiple($args = array())
}

/**
* @param mixed $arg
* @return Base
* @param mixed $arg
*
* @return Base
*
* @throws \InvalidArgumentException
*/
public function add($arg)
{
Expand Down
9 changes: 4 additions & 5 deletions lib/Doctrine/ORM/Query/Expr/Comparison.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
namespace Doctrine\ORM\Query\Expr;

/**
* Expression class for DQL comparison expressions
* Expression class for DQL comparison expressions.
*
*
* @link www.doctrine-project.org
* @since 2.0
* @author Guilherme Blanco <[email protected]>
Expand Down Expand Up @@ -56,9 +55,9 @@ class Comparison
/**
* Creates a comparison expression with the given arguments.
*
* @param mixed $leftExpr
* @param string $operator
* @param mixed $rightExpr
* @param mixed $leftExpr
* @param string $operator
* @param mixed $rightExpr
*/
public function __construct($leftExpr, $operator, $rightExpr)
{
Expand Down
9 changes: 4 additions & 5 deletions lib/Doctrine/ORM/Query/Expr/Composite.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
namespace Doctrine\ORM\Query\Expr;

/**
* Expression class for building DQL and parts
* Expression class for building DQL and parts.
*
*
* @link www.doctrine-project.org
* @since 2.0
* @author Guilherme Blanco <[email protected]>
Expand All @@ -49,10 +48,10 @@ public function __toString()
return implode($this->separator, $components);
}


/**
* @param string $part
* @return string
* @param string $part
*
* @return string
*/
private function processQueryPart($part)
{
Expand Down
9 changes: 4 additions & 5 deletions lib/Doctrine/ORM/Query/Expr/From.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
namespace Doctrine\ORM\Query\Expr;

/**
* Expression class for DQL from
* Expression class for DQL from.
*
*
* @link www.doctrine-project.org
* @since 2.0
* @author Guilherme Blanco <[email protected]>
Expand All @@ -47,9 +46,9 @@ class From
protected $indexBy;

/**
* @param string $from The class name.
* @param string $alias The alias of the class.
* @param string $indexBy The index for the from.
* @param string $from The class name.
* @param string $alias The alias of the class.
* @param string $indexBy The index for the from.
*/
public function __construct($from, $alias, $indexBy = null)
{
Expand Down
7 changes: 3 additions & 4 deletions lib/Doctrine/ORM/Query/Expr/Func.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
namespace Doctrine\ORM\Query\Expr;

/**
* Expression class for generating DQL functions
* Expression class for generating DQL functions.
*
*
* @link www.doctrine-project.org
* @since 2.0
* @author Guilherme Blanco <[email protected]>
Expand All @@ -44,8 +43,8 @@ class Func
/**
* Creates a function, with the given argument.
*
* @param string $name
* @param array $arguments
* @param string $name
* @param array $arguments
*/
public function __construct($name, $arguments)
{
Expand Down
3 changes: 1 addition & 2 deletions lib/Doctrine/ORM/Query/Expr/GroupBy.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
namespace Doctrine\ORM\Query\Expr;

/**
* Expression class for building DQL Group By parts
* Expression class for building DQL Group By parts.
*
*
* @link www.doctrine-project.org
* @since 2.0
* @author Guilherme Blanco <[email protected]>
Expand Down
16 changes: 7 additions & 9 deletions lib/Doctrine/ORM/Query/Expr/Join.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
namespace Doctrine\ORM\Query\Expr;

/**
* Expression class for DQL from
* Expression class for DQL join.
*
*
* @link www.doctrine-project.org
* @since 2.0
* @author Guilherme Blanco <[email protected]>
Expand Down Expand Up @@ -68,12 +67,12 @@ class Join
protected $indexBy;

/**
* @param string $joinType The condition type constant. Either INNER_JOIN or LEFT_JOIN.
* @param string $join The relationship to join
* @param string $alias The alias of the join
* @param string $conditionType The condition type constant. Either ON or WITH.
* @param string $condition The condition for the join
* @param string $indexBy The index for the join
* @param string $joinType The condition type constant. Either INNER_JOIN or LEFT_JOIN.
* @param string $join The relationship to join.
* @param string|null $alias The alias of the join.
* @param string|null $conditionType The condition type constant. Either ON or WITH.
* @param string|null $condition The condition for the join.
* @param string|null $indexBy The index for the join.
*/
public function __construct($joinType, $join, $alias = null, $conditionType = null, $condition = null, $indexBy = null)
{
Expand Down Expand Up @@ -133,7 +132,6 @@ public function getIndexBy()
return $this->indexBy;
}


/**
* @return string
*/
Expand Down
4 changes: 1 addition & 3 deletions lib/Doctrine/ORM/Query/Expr/Literal.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
namespace Doctrine\ORM\Query\Expr;

/**
* Expression class for generating DQL functions
* Expression class for generating DQL functions.
*
*
* @link www.doctrine-project.org
* @since 2.0
* @author Guilherme Blanco <[email protected]>
Expand All @@ -48,5 +47,4 @@ public function getParts()
{
return $this->parts;
}

}
9 changes: 4 additions & 5 deletions lib/Doctrine/ORM/Query/Expr/Math.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
namespace Doctrine\ORM\Query\Expr;

/**
* Expression class for DQL math statements
* Expression class for DQL math statements.
*
*
* @link www.doctrine-project.org
* @since 2.0
* @author Guilherme Blanco <[email protected]>
Expand All @@ -49,9 +48,9 @@ class Math
/**
* Creates a mathematical expression with the given arguments.
*
* @param mixed $leftExpr
* @param string $operator
* @param mixed $rightExpr
* @param mixed $leftExpr
* @param string $operator
* @param mixed $rightExpr
*/
public function __construct($leftExpr, $operator, $rightExpr)
{
Expand Down
13 changes: 7 additions & 6 deletions lib/Doctrine/ORM/Query/Expr/OrderBy.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
namespace Doctrine\ORM\Query\Expr;

/**
* Expression class for building DQL Order By parts
* Expression class for building DQL Order By parts.
*
*
* @link www.doctrine-project.org
* @since 2.0
* @author Guilherme Blanco <[email protected]>
Expand Down Expand Up @@ -57,8 +56,8 @@ class OrderBy
protected $parts = array();

/**
* @param string $sort
* @param string $order
* @param string|null $sort
* @param string|null $order
*/
public function __construct($sort = null, $order = null)
{
Expand All @@ -68,8 +67,10 @@ public function __construct($sort = null, $order = null)
}

/**
* @param string $sort
* @param string $order
* @param string $sort
* @param string|null $order
*
* @return void
*/
public function add($sort, $order = null)
{
Expand Down
3 changes: 1 addition & 2 deletions lib/Doctrine/ORM/Query/Expr/Orx.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
namespace Doctrine\ORM\Query\Expr;

/**
* Expression class for building DQL OR clauses
* Expression class for building DQL OR clauses.
*
*
* @link www.doctrine-project.org
* @since 2.0
* @author Guilherme Blanco <[email protected]>
Expand Down
3 changes: 1 addition & 2 deletions lib/Doctrine/ORM/Query/Expr/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
namespace Doctrine\ORM\Query\Expr;

/**
* Expression class for building DQL select statements
* Expression class for building DQL select statements.
*
*
* @link www.doctrine-project.org
* @since 2.0
* @author Guilherme Blanco <[email protected]>
Expand Down
21 changes: 14 additions & 7 deletions lib/Doctrine/ORM/Query/Filter/SQLFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,22 @@ abstract class SQLFilter
{
/**
* The entity manager.
*
* @var EntityManager
*/
private $em;

/**
* Parameters for the filter.
*
* @var array
*/
private $parameters;

/**
* Constructs the SQLFilter object.
*
* @param EntityManager $em The EM
* @param EntityManager $em The entity manager.
*/
final public function __construct(EntityManager $em)
{
Expand All @@ -59,11 +61,11 @@ final public function __construct(EntityManager $em)
/**
* Sets a parameter that can be used by the filter.
*
* @param string $name Name of the parameter.
* @param string $value Value of the parameter.
* @param string $type The parameter type. If specified, the given value will be run through
* the type conversion of this type. This is usually not needed for
* strings and numeric types.
* @param string $name Name of the parameter.
* @param string $value Value of the parameter.
* @param string|null $type The parameter type. If specified, the given value will be run through
* the type conversion of this type. This is usually not needed for
* strings and numeric types.
*
* @return SQLFilter The current SQL filter.
*/
Expand Down Expand Up @@ -93,6 +95,8 @@ final public function setParameter($name, $value, $type = null)
* @param string $name Name of the parameter.
*
* @return string The SQL escaped parameter to use in a query.
*
* @throws \InvalidArgumentException
*/
final public function getParameter($name)
{
Expand All @@ -116,7 +120,10 @@ final public function __toString()
/**
* Gets the SQL query part to add to a query.
*
* @return string The constraint SQL if there is available, empty string otherwise
* @param ClassMetaData $targetEntity
* @param string $targetTableAlias
*
* @return string The constraint SQL if there is available, empty string otherwise.
*/
abstract public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias);
}

0 comments on commit 28966e2

Please sign in to comment.