1: <?php
2:
3: namespace PHPixie\Database\Driver\Mongo\Query;
4:
5: abstract class Items extends Item implements \PHPixie\Database\Type\Document\Query\Items
6: {
7: public function limit($limit)
8: {
9: $this->builder->setLimit($limit);
10:
11: return $this;
12: }
13:
14: public function clearLimit()
15: {
16: $this->builder->clearValue('limit');
17:
18: return $this;
19: }
20:
21: public function getLimit()
22: {
23: return $this->builder->getValue('limit');
24: }
25:
26: public function offset($offset)
27: {
28: $this->builder->setOffset($offset);
29:
30: return $this;
31: }
32:
33: public function clearOffset()
34: {
35: $this->builder->clearValue('offset');
36:
37: return $this;
38: }
39:
40: public function getOffset()
41: {
42: return $this->builder->getValue('offset');
43: }
44:
45: public function orderAscendingBy($field)
46: {
47: $this->builder->addOrderAscendingBy($field);
48:
49: return $this;
50: }
51:
52: public function orderDescendingBy($field)
53: {
54: $this->builder->addOrderDescendingBy($field);
55:
56: return $this;
57: }
58:
59: public function clearOrderBy()
60: {
61: $this->builder->clearArray('orderBy');
62:
63: return $this;
64: }
65:
66: public function getOrderBy()
67: {
68: return $this->builder->getArray('orderBy');
69: }
70:
71: }
72: