PHP Class Storm\Api\Base\Fluent\CriterionBuilder

Author: Elliot Levin ([email protected])
Mostrar archivo Open project: timetoogo/penumbra Class Usage Examples

Protected Properties

Property Type Description
$EntityMap
$EntityType

Public Methods

Method Description
BuildCriterion ( ) : Criterion Returns the built criterion
GroupBy ( callable $Expression ) : CriterionBuilder Specifies the function to use as grouping for the criterion.
Limit ( integer | null $Amount ) : CriterionBuilder Specifies the amount of entities to retrieve. Pass null to remove limit.
OrderBy ( callable $Expression ) : CriterionBuilder Specifies the closure to use as an ascending ordering for the criterion.
OrderByDescending ( callable $Expression ) : CriterionBuilder Specifies the function to use as an descending ordering for the criterion.
Skip ( integer $Amount ) : CriterionBuilder Specifies the amount of entities to skip.
Where ( callable $Predicate ) : CriterionBuilder Specifies a closure to parse as predicate for this criterion.
__construct ( Storm\Core\Object\IEntityMap $EntityMap, FunctionToASTConverter $FunctionToASTConverter )

Protected Methods

Method Description
FunctionToExpandedAST ( callable $Function ) : Storm\Drivers\Fluent\Object\Functional\IAST Parses a given function into an IAST structure using the provider converter

Method Details

BuildCriterion() final public method

Returns the built criterion
final public BuildCriterion ( ) : Criterion
return Storm\Drivers\Fluent\Object\Criterion The specified criterion

FunctionToExpandedAST() final protected method

Parses a given function into an IAST structure using the provider converter
final protected FunctionToExpandedAST ( callable $Function ) : Storm\Drivers\Fluent\Object\Functional\IAST
$Function callable The function to parse
return Storm\Drivers\Fluent\Object\Functional\IAST The return

GroupBy() final public method

Example expression closure: function (Car $Car) { return $Car->GetBrand(); }
final public GroupBy ( callable $Expression ) : CriterionBuilder
$Expression callable The expression function
return CriterionBuilder

Limit() final public method

Specifies the amount of entities to retrieve. Pass null to remove limit.
final public Limit ( integer | null $Amount ) : CriterionBuilder
$Amount integer | null The amount of entities to retrieve
return CriterionBuilder

OrderBy() final public method

Example expression closure: function (Car $Car) { return $Car->GetManufactureDate(); }
final public OrderBy ( callable $Expression ) : CriterionBuilder
$Expression callable The expression closure
return CriterionBuilder

OrderByDescending() final public method

Example expression closure: function (Car $Car) { return $Car->GetManufactureDate(); }
final public OrderByDescending ( callable $Expression ) : CriterionBuilder
$Expression callable The expression closure
return CriterionBuilder

Skip() final public method

Specifies the amount of entities to skip.
final public Skip ( integer $Amount ) : CriterionBuilder
$Amount integer The amount of entities to skip
return CriterionBuilder

Where() final public method

Example predicate closure: function (Car $Car) use ($Name) { return $Car->IsAvailable() && $Car->GetName() === $Name; }
final public Where ( callable $Predicate ) : CriterionBuilder
$Predicate callable The predicate function
return CriterionBuilder

__construct() public method

public __construct ( Storm\Core\Object\IEntityMap $EntityMap, FunctionToASTConverter $FunctionToASTConverter )
$EntityMap Storm\Core\Object\IEntityMap
$FunctionToASTConverter Storm\Api\Base\FunctionToASTConverter

Property Details

$EntityMap protected_oe property

protected $EntityMap

$EntityType protected_oe property

protected $EntityType