$parentClass
$parentClass :
Builder
Extends QueryBuilder to add findBy options and includes the base Paginator helpers.
setFilter(callback $filter) : self
Set the result filter
The filter will be passed the individual result model:
$paginator = new Ceo\Helpers\Paginator(1,2)
->from('Ceo\Models\Foo')
->orderBy('created_at desc')
->where('name = :name:', array('name' => $name))
->andWhere('type = :type:', array('type' => $type))
->setFilter(function($model) {
return $model->toArray();
})
->paginate();
| callback | $filter |