ICanBoogie/Facets v0.3.1
  • Namespace
  • Class

Namespaces

  • ICanBoogie
    • Facets
      • RecordCollection

Classes

  • BooleanCriterion
  • Criterion
  • CriterionList
  • CriterionNotDefined
  • CriterionValue
  • Fetcher
  • IntervalCriterionValue
  • QueryString
  • QueryStringWord
  • RecordCollection
  • SetCriterionValue

Interfaces

  • CriterionInterface
  • FetcherInterface

Traits

  • CriterionTrait
  • FetcherTrait
  • HumanizePairsTrait
  • ParseQueryStringTrait

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

Clones the criteria of the criterion list.

Clones the criteria of the criterion list.

public
# getIterator( )

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( )
public ICanBoogie\Facets\QueryString
# parse_query_string( ICanBoogie\Facets\QueryString|string $q )

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 array
# alter_conditions( array & $conditions, array $modifiers )

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 ICanBoogie\Facets\CriterionList
# alter_query( ICanBoogie\ActiveRecord\Query & $query )

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 ICanBoogie\Facets\CriterionList
# alter_query_with_conditions( ICanBoogie\ActiveRecord\Query & $query, array $values )

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 ICanBoogie\Facets\CriterionList
# alter_query_with_order( ICanBoogie\ActiveRecord\Query & $query, string $criterion_id, integer $order_direction = 1 )

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 ICanBoogie\Facets\CriterionList
# alter_records( array & $records )

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 string[]
# humanize( array $conditions )

Returns human readable values.

Returns human readable values.

Parameters

$conditions

Returns

string[]

Properties summary

protected ICanBoogie\Facets\Criterion[] $criterion_list

Criterion list.

Criterion list.

# []
ICanBoogie/Facets v0.3.1 API documentation generated by ApiGen