ICanBoogie/bind-facets 0.7.x
  • Namespace
  • Class

Namespaces

  • ICanBoogie
    • Binding
      • Facets

Classes

  • Hooks

Interfaces

  • HasCriteriaProperty
  • HasCriterionListProperty
  • HasFetchRecordMethod
  • HasFetchRecordsMethod

Traits

  • ModelBindings

Class Hooks

Namespace: ICanBoogie\Binding\Facets
Located at Hooks.php

Methods summary

public static array
# synthesize_config( array $fragments )

Synthesizes the activerecord_facets config from activerecord fragments.

Synthesizes the activerecord_facets config from activerecord fragments.

Parameters

$fragments

Returns

array
public static array
# criteria_from( ICanBoogie\ActiveRecord\Model $model )

Returns the criteria associated with the specified model.

Returns the criteria associated with the specified model.

The criteria include the criteria of the parent models.

Parameters

$model

Returns

array
public static ICanBoogie\Facets\CriterionList
# criterion_list_from( ICanBoogie\ActiveRecord\Model $model )

Returns the ICanBoogie\Facets\CriterionList instance associated with the specified model.

Returns the ICanBoogie\Facets\CriterionList instance associated with the specified model.

Parameters

$model

Returns

ICanBoogie\Facets\CriterionList
public static ICanBoogie\Facets\RecordCollection|null
# fetch_records( ICanBoogie\ActiveRecord\Model $model, array $conditions )

Fetches the records matching the specified conditions.

Fetches the records matching the specified conditions.

A ICanBoogie\Facets\Fetcher\BasicFetcher instance is used to fetch the records.

Parameters

$model
$conditions

Returns

ICanBoogie\Facets\RecordCollection|null
public static ICanBoogie\ActiveRecord|null
# fetch_record( ICanBoogie\ActiveRecord\Model $model, array $conditions, ICanBoogie\Facets\Fetcher & $fetcher = null )

Fetches a record matching the specified conditions.

Fetches a record matching the specified conditions.

The model's ICanBoogie\Binding\Facets\Hooks::fetch_records() prototype method is used to retrieve the record.

Parameters

$model
$conditions
$fetcher

If the parameter fetcher is present, the ICanBoogie\Facets\Fetcher instance used to fetch the record is stored inside.

Returns

ICanBoogie\ActiveRecord|null
ICanBoogie/bind-facets 0.7.x API documentation generated by ApiGen