| @@ 66-75 (lines=10) @@ | ||
| 63 | * |
|
| 64 | * @return int|null |
|
| 65 | */ |
|
| 66 | public function getLimit() |
|
| 67 | { |
|
| 68 | if(!isset($this->payload['limit'])) |
|
| 69 | return 100; |
|
| 70 | ||
| 71 | if(!is_numeric($this->payload['limit'])) |
|
| 72 | return 100; |
|
| 73 | ||
| 74 | return (int) $this->payload['limit']; |
|
| 75 | } |
|
| 76 | ||
| 77 | /** |
|
| 78 | * Retorna o offset de linhas |
|
| @@ 82-91 (lines=10) @@ | ||
| 79 | * |
|
| 80 | * @return int|null |
|
| 81 | */ |
|
| 82 | public function getOffset() |
|
| 83 | { |
|
| 84 | if(!isset($this->payload['offset'])) |
|
| 85 | return 1; |
|
| 86 | ||
| 87 | if(!is_numeric($this->payload['offset'])) |
|
| 88 | return 1; |
|
| 89 | ||
| 90 | return (int) $this->payload['offset']; |
|
| 91 | } |
|
| 92 | ||
| 93 | /** |
|
| 94 | * Retorna a ordem definida pelo usuário em string |
|