1: <?php
2:
3: namespace PHPixie;
4:
5: class PaginateORM
6: {
7: protected $paginate;
8: protected $builder;
9:
10: public function __construct($paginate)
11: {
12: $this->builder = $this->buildBuilder($paginate);
13: }
14:
15: public function queryLoader($query, $preload = array())
16: {
17: return $this->builder->queryLoader($query, $preload);
18: }
19:
20: public function queryPager($query, $pageSize, $preload = array())
21: {
22: return $this->builder->queryPager($query, $pageSize, $preload);
23: }
24:
25: public function builder()
26: {
27: return $this->builder;
28: }
29:
30: protected function buildBuilder($paginate)
31: {
32: return new PaginateORM\Builder($paginate);
33: }
34: }