-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathPaginatable.php
More file actions
56 lines (48 loc) · 1.08 KB
/
Paginatable.php
File metadata and controls
56 lines (48 loc) · 1.08 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
namespace ipl\Stdlib\Contract;
use Countable;
interface Paginatable extends Countable
{
/**
* Get whether a limit is set
*
* @return bool
*/
public function hasLimit(): bool;
/**
* Get the limit
*
* @return ?int
*/
public function getLimit(): ?int;
/**
* Set the limit
*
* @param ?int $limit Maximum number of items to return. If you want to disable the limit,
* it is best practice to use null or a negative value
*
* @return $this
*/
public function limit(?int $limit): static;
/**
* Get whether an offset is set
*
* @return bool
*/
public function hasOffset(): bool;
/**
* Get the offset
*
* @return ?int
*/
public function getOffset(): ?int;
/**
* Set the offset
*
* @param ?int $offset Start result set after this many rows. If you want to disable the offset,
* it is best practice to use null or a negative value
*
* @return $this
*/
public function offset(?int $offset): static;
}