1 | <?php |
||
5 | class Limit extends AbstractPart |
||
6 | { |
||
7 | /** |
||
8 | * {@inheritdoc} |
||
9 | */ |
||
10 | protected $partPrefix = 'LIMIT'; |
||
11 | |||
12 | /** |
||
13 | * @var integer|null $rowCount The maximum number of rows to return |
||
14 | */ |
||
15 | protected $rowCount = null; |
||
16 | |||
17 | /** |
||
18 | * @var integer|null $offset The offset of the first row to return |
||
19 | */ |
||
20 | protected $offset = null; |
||
21 | |||
22 | /** |
||
23 | * Getter accessor to property rowCount |
||
24 | * |
||
25 | * @return integer|null |
||
26 | */ |
||
27 | public function getRowCount() |
||
31 | |||
32 | /** |
||
33 | * Getter accessor to property offset |
||
34 | * |
||
35 | * @return integer|null |
||
36 | */ |
||
37 | public function getOffset() |
||
41 | |||
42 | /** |
||
43 | * Magic method __invoke, used when the user call object like a function |
||
44 | * @link http://php.net/manual/en/language.oop5.magic.php#object.invoke |
||
45 | * |
||
46 | * @param integer|array $limitInfos If it's a integer, the number of row to |
||
47 | * return. If an array, the format is [offset, rowCount] |
||
48 | */ |
||
49 | public function __invoke(...$limitInfos) |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | public function generate(): string |
||
72 | } |
||
73 |