PHP Class Doctrine\Common\Collections\Expr\ClosureExpressionVisitor

This closure can be used with {@Collection #filter()} and is used internally by {@ArrayCollection #select()}.
Since: 2.3
Author: Benjamin Eberlei ([email protected])
Inheritance: extends Doctrine\Common\Collections\Expr\ExpressionVisitor
Datei anzeigen Open project: doctrine/collections Class Usage Examples

Public Methods

Method Description
getObjectFieldValue ( object $object, string $field ) : mixed Accesses the field of a given object. This field has to be public directly or indirectly (through an accessor get*, is*, or a magic method, __get, __call).
sortByField ( string $name, integer $orientation = 1, Closure $next = null ) : Closure Helper for sorting arrays of objects based on multiple fields + orientations.
walkComparison ( Comparison $comparison ) {@inheritDoc}
walkCompositeExpression ( Doctrine\Common\Collections\Expr\CompositeExpression $expr ) {@inheritDoc}
walkValue ( Doctrine\Common\Collections\Expr\Value $value ) {@inheritDoc}

Private Methods

Method Description
andExpressions ( array $expressions ) : callable
orExpressions ( array $expressions ) : callable

Method Details

getObjectFieldValue() public static method

Accesses the field of a given object. This field has to be public directly or indirectly (through an accessor get*, is*, or a magic method, __get, __call).
public static getObjectFieldValue ( object $object, string $field ) : mixed
$object object
$field string
return mixed

sortByField() public static method

Helper for sorting arrays of objects based on multiple fields + orientations.
public static sortByField ( string $name, integer $orientation = 1, Closure $next = null ) : Closure
$name string
$orientation integer
$next Closure
return Closure

walkComparison() public method

{@inheritDoc}
public walkComparison ( Comparison $comparison )
$comparison Comparison

walkCompositeExpression() public method

{@inheritDoc}
public walkCompositeExpression ( Doctrine\Common\Collections\Expr\CompositeExpression $expr )
$expr Doctrine\Common\Collections\Expr\CompositeExpression

walkValue() public method

{@inheritDoc}
public walkValue ( Doctrine\Common\Collections\Expr\Value $value )
$value Doctrine\Common\Collections\Expr\Value