blob: dc938c74c7517903c7a5537f5b676e1cbf51d427 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<?php
/**
* @class LimitOffsetQueryComponent
* Limit and offset clauses of a query.
* @see Query
*/
class LimitOffsetQueryComponent extends QueryComponent
{
/**
* Specify a limit and an offset.
*
* @param int $limit The limit.
* @param int $offset The offset.
*/
function __construct($limit = 25, $offset = 0)
{
$this->limit = (int)$limit;
$this->offset = (int)$offset;
}
function __toString()
{
return "limit {$this->offset}, {$this->limit}";
}
}
|