Class CriterionList
A list of criteria.
- ICanBoogie\Facets\CriterionList implements IteratorAggregate, ArrayAccess, ICanBoogie\ToArray
Methods summary
public
__construct( array $criterion_list
= [] )
Initializes the ICanBoogie\Facets\CriterionList::$criterion_list
property.
Initializes the ICanBoogie\Facets\CriterionList::$criterion_list
property.
Parameters
$criterion_list
- A list of criteria.
public
__clone( void )
Clones the criteria of the criterion list.
Clones the criteria of the criterion list.
public
parse_query_string( ICanBoogie\Facets\QueryString
|string $q
)
: ICanBoogie\Facets\QueryString
Parses the query string and marks words matched by criteria.
Parses the query string and marks words matched by criteria.
Parameters
$q
Returns
public
alter_conditions( array & $conditions
, array $modifiers
)
: array
Alters the conditions according to the specified modifiers.
Alters the conditions according to the specified modifiers.
The Criterion::alter_conditions() method is invoked for each criterion.
Parameters
$conditions
- The conditions to alter.
$modifiers
- The modifiers.
Returns
The altered conditions.
public
alter_query( ICanBoogie\ActiveRecord\Query & $query
)
: ICanBoogie\Facets\CriterionList
Alters the query with initial requirements.
Alters the query with initial requirements.
The Criterion::alter_query() method is invoked for each criterion.
Parameters
$query
Returns
public
alter_query_with_conditions( ICanBoogie\ActiveRecord\Query & $query
, array $values
)
: ICanBoogie\Facets\CriterionList
Alters the query with the criteria matching the values.
Alters the query with the criteria matching the values.
The Criterion::alter_query_with_value() method is invoked for each criterion matching the a value.
Parameters
$query
- The query to alter.
$values
- The criteria values, as returned by the
ICanBoogie\Facets\CriterionList::alter_conditions()
method.
Returns
public
alter_query_with_order( ICanBoogie\ActiveRecord\Query & $query
, string $criterion_id
, integer $order_direction
= 1 )
: ICanBoogie\Facets\CriterionList
Alters the query with a criterion and an order direction.
Alters the query with a criterion and an order direction.
The Criterion::alter_query_with_order() method is invoked on the criterion
matching the $criterion_id
parameter.
Parameters
$query
$criterion_id
Criterion identifier. If prefixed with the minus sign "-"
$order_direction
is overrode with-1
.$order_direction
The direction of the order: 1 ascending, -1 descending. Default: 1.
Returns
public
alter_records( array & $records
)
: ICanBoogie\Facets\CriterionList
Alters the records with the criteria.
Alters the records with the criteria.
The Criterion::alter_records() method is invoked for each criterion.
Parameters
$records