blob: 2cc77dd4725c60bb2571599396bfd4497583113f (
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
26
|
<?php
/**
* @class LimitOffsetQueryComponent
* Limit and offset clauses of a query.
* @author Curverider Ltd
* @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}";
}
}
|