Skip to content

Commit

Permalink
matching
Browse files Browse the repository at this point in the history
  • Loading branch information
armenio committed Dec 5, 2016
1 parent 0e37e7f commit f3e3ce3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/ORM/Paginator/Adapter/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ public function getItems($offset, $itemsPerPage)
public function count()
{
$params = $this->params;
return $this->table->find('all', $params)->count();

$finder = $this->table->find('all', $params);

if (isset($params['matching']) && !empty($params['matching'])) {
foreach ($params['matching'] as $assoc => $builder) {
$finder->matching($assoc, $builder);
}
}

return $finder->count();
}
}

0 comments on commit f3e3ce3

Please sign in to comment.