PHP Class LazyRecord\CollectionFilter\CollectionFilter

Show file Open project: corneltek/lazyrecord

Public Properties

Property Type Description
$collection
$schema the schema object
$validFields
$validValues contains field-to-definitions data structure: "field_name" => [ 1,2,3,4 ] "field_name" => [ "foo", "bar" ] "field_name" => [ "label" => 1, "label2" => 2]

Public Methods

Method Description
__construct ( BaseCollection $collection )
apply ( array $args )
applyFromRequest ( $requestPrefix = '_filter_' ) Apply filters from request parameters.
defineContains ( $field )
defineEndsWith ( $field )
defineEqual ( $fieldName, $validValues = null )
defineInSet ( $field, $validValues )
defineRange ( $field, $validValues = null )
defineStartsWith ( $field )
getCollection ( $c )
setCollection ( $c )
validateValue ( $validValues, &$val )

Method Details

__construct() public method

public __construct ( BaseCollection $collection )
$collection LazyRecord\BaseCollection

apply() public method

public apply ( array $args )
$args array

applyFromRequest() public method

Apply filters from request parameters.
public applyFromRequest ( $requestPrefix = '_filter_' )

defineContains() public method

public defineContains ( $field )

defineEndsWith() public method

public defineEndsWith ( $field )

defineEqual() public method

public defineEqual ( $fieldName, $validValues = null )

defineInSet() public method

public defineInSet ( $field, $validValues )

defineRange() public method

public defineRange ( $field, $validValues = null )

defineStartsWith() public method

public defineStartsWith ( $field )

getCollection() public method

public getCollection ( $c )

setCollection() public method

public setCollection ( $c )

validateValue() public method

public validateValue ( $validValues, &$val )

Property Details

$collection public property

public $collection

$schema public property

the schema object
public $schema

$validFields public property

public $validFields

$validValues public property

contains field-to-definitions data structure: "field_name" => [ 1,2,3,4 ] "field_name" => [ "foo", "bar" ] "field_name" => [ "label" => 1, "label2" => 2]
public $validValues