File tree Expand file tree Collapse file tree 4 files changed +68
-68
lines changed
Expand file tree Collapse file tree 4 files changed +68
-68
lines changed Original file line number Diff line number Diff line change 22
33namespace ipl \Stdlib \Contract ;
44
5- interface Paginatable extends PaginationInterface
5+ use Countable ;
6+
7+ interface Paginatable extends Countable
68{
9+ /**
10+ * Get whether a limit is set
11+ *
12+ * @return bool
13+ */
14+ public function hasLimit ();
15+
16+ /**
17+ * Get the limit
18+ *
19+ * @return int|null
20+ */
21+ public function getLimit ();
22+
23+ /**
24+ * Set the limit
25+ *
26+ * @param int|null $limit Maximum number of items to return. If you want to disable the limit,
27+ * it is best practice to use null or a negative value
28+ *
29+ * @return $this
30+ */
31+ public function limit ($ limit );
32+
33+ /**
34+ * Get whether an offset is set
35+ *
36+ * @return bool
37+ */
38+ public function hasOffset ();
39+
40+ /**
41+ * Get the offset
42+ *
43+ * @return int|null
44+ */
45+ public function getOffset ();
46+
47+ /**
48+ * Set the offset
49+ *
50+ * @param int|null $offset Start result set after this many rows. If you want to disable the offset,
51+ * it is best practice to use null or a negative value
52+ *
53+ * @return $this
54+ */
55+ public function offset ($ offset );
756}
Original file line number Diff line number Diff line change 22
33namespace ipl \Stdlib \Contract ;
44
5- use Countable ;
6-
75/** @deprecated Use {@link Paginatable} instead */
8- interface PaginationInterface extends Countable
6+ interface PaginationInterface extends Paginatable
97{
10- /**
11- * Get whether a limit is set
12- *
13- * @return bool
14- */
15- public function hasLimit ();
16-
17- /**
18- * Get the limit
19- *
20- * @return int|null
21- */
22- public function getLimit ();
23-
24- /**
25- * Set the limit
26- *
27- * @param int|null $limit Maximum number of items to return. If you want to disable the limit,
28- * it is best practice to use null or a negative value
29- *
30- * @return $this
31- */
32- public function limit ($ limit );
33-
34- /**
35- * Get whether an offset is set
36- *
37- * @return bool
38- */
39- public function hasOffset ();
40-
41- /**
42- * Get the offset
43- *
44- * @return int|null
45- */
46- public function getOffset ();
47-
48- /**
49- * Set the offset
50- *
51- * @param int|null $offset Start result set after this many rows. If you want to disable the offset,
52- * it is best practice to use null or a negative value
53- *
54- * @return $this
55- */
56- public function offset ($ offset );
578}
Original file line number Diff line number Diff line change 22
33namespace ipl \Stdlib \Contract ;
44
5- interface Validator extends ValidatorInterface
5+ interface Validator
66{
7+ /**
8+ * Get whether the given value is valid
9+ *
10+ * @param mixed $value
11+ *
12+ * @return bool
13+ */
14+ public function isValid ($ value );
15+
16+ /**
17+ * Get the validation error messages
18+ *
19+ * @return array
20+ */
21+ public function getMessages ();
722}
Original file line number Diff line number Diff line change 33namespace ipl \Stdlib \Contract ;
44
55/** @deprecated Use {@link Validator} instead */
6- interface ValidatorInterface
6+ interface ValidatorInterface extends Validator
77{
8- /**
9- * Get whether the given value is valid
10- *
11- * @param mixed $value
12- *
13- * @return bool
14- */
15- public function isValid ($ value );
16-
17- /**
18- * Get the validation error messages
19- *
20- * @return array
21- */
22- public function getMessages ();
238}
You can’t perform that action at this time.
0 commit comments