1
0
mirror of synced 2025-02-20 06:03:15 +03:00

Fixed documentation for Doctrine\ORM\Query\Expr and Doctrine\ORM\Query\Filter

This commit is contained in:
Benjamin Morel 2012-12-13 12:05:34 +00:00
parent d4357801a2
commit 28966e2087
14 changed files with 61 additions and 63 deletions

View File

@ -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 <guilhermeblanco@hotmail.com>

View File

@ -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 <guilhermeblanco@hotmail.com>
@ -65,8 +64,9 @@ abstract class Base
}
/**
* @param array $args
* @return Base
* @param array $args
*
* @return Base
*/
public function addMultiple($args = array())
{
@ -78,8 +78,11 @@ abstract class Base
}
/**
* @param mixed $arg
* @return Base
* @param mixed $arg
*
* @return Base
*
* @throws \InvalidArgumentException
*/
public function add($arg)
{

View File

@ -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 <guilhermeblanco@hotmail.com>
@ -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)
{

View File

@ -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 <guilhermeblanco@hotmail.com>
@ -49,10 +48,10 @@ class Composite extends Base
return implode($this->separator, $components);
}
/**
* @param string $part
* @return string
* @param string $part
*
* @return string
*/
private function processQueryPart($part)
{

View File

@ -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 <guilhermeblanco@hotmail.com>
@ -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)
{

View File

@ -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 <guilhermeblanco@hotmail.com>
@ -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)
{

View File

@ -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 <guilhermeblanco@hotmail.com>

View File

@ -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 <guilhermeblanco@hotmail.com>
@ -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)
{
@ -133,7 +132,6 @@ class Join
return $this->indexBy;
}
/**
* @return string
*/

View File

@ -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 <guilhermeblanco@hotmail.com>
@ -48,5 +47,4 @@ class Literal extends Base
{
return $this->parts;
}
}

View File

@ -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 <guilhermeblanco@hotmail.com>
@ -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)
{

View File

@ -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 <guilhermeblanco@hotmail.com>
@ -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)
{
@ -68,8 +67,10 @@ class OrderBy
}
/**
* @param string $sort
* @param string $order
* @param string $sort
* @param string|null $order
*
* @return void
*/
public function add($sort, $order = null)
{

View File

@ -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 <guilhermeblanco@hotmail.com>

View File

@ -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 <guilhermeblanco@hotmail.com>

View File

@ -36,12 +36,14 @@ abstract class SQLFilter
{
/**
* The entity manager.
*
* @var EntityManager
*/
private $em;
/**
* Parameters for the filter.
*
* @var array
*/
private $parameters;
@ -49,7 +51,7 @@ abstract class SQLFilter
/**
* Constructs the SQLFilter object.
*
* @param EntityManager $em The EM
* @param EntityManager $em The entity manager.
*/
final public function __construct(EntityManager $em)
{
@ -59,11 +61,11 @@ abstract class SQLFilter
/**
* 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.
*/
@ -93,6 +95,8 @@ abstract class SQLFilter
* @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)
{
@ -116,7 +120,10 @@ abstract class SQLFilter
/**
* 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);
}