ICanBoogie
  • Documentation
  • API Reference
  • Facets master
Namespaces
  • ICanBoogie
    • Facets
      • Criterion
      • CriterionValue
      • Fetcher
      • RecordCollection
Classes
  • CriterionList
  • CriterionNotDefined
  • CriterionValue
  • QueryString
  • QueryStringWord
  • RecordCollection
Interfaces
  • Criterion
  • Fetcher
Traits
  • CriterionTrait
  • FetcherTrait
  • ModelBindings

Class CriterionList

A list of criteria.

ICanBoogie\Facets\CriterionList implements IteratorAggregate, ArrayAccess, ICanBoogie\ToArray
Namespace: ICanBoogie\Facets
Located at CriterionList.php

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 getIterator( void )

Implementation of

IteratorAggregate::getIterator()
public offsetExists( $criterion_id )

Implementation of

ArrayAccess::offsetExists()
public offsetGet( $criterion_id )

Implementation of

ArrayAccess::offsetGet()
public offsetSet( $criterion_id, $criterion )

Implementation of

ArrayAccess::offsetSet()
public offsetUnset( $criterion_id )

Implementation of

ArrayAccess::offsetUnset()
public to_array( void )
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

ICanBoogie\Facets\QueryString
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

array
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

ICanBoogie\Facets\CriterionList
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

ICanBoogie\Facets\CriterionList
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

ICanBoogie\Facets\CriterionList
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

Returns

ICanBoogie\Facets\CriterionList
public humanize( array $conditions ) : string[]

Returns human readable values.

Returns human readable values.

Parameters

$conditions

Returns

string[]

Properties summary

protected $criterion_list : ICanBoogie\Facets\Criterion[]

Criterion list.

Criterion list.

[]
Facets master – Check on GitHub – API documentation generated by ApiGen