PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.9
GiveWP – Donation Plugin and Fundraising Platform v4.16.9
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
← All changes | src/Framework/Models/ModelQueryBuilder.php +19 -0 2.30.04.16.9 View file →
@@ -51,13 +51,30 @@
51 51 return +parent::get()->count;
52 52 }
53 53
54 54 /**
55 + * @since 3.6.0
56 + *
57 + * @param int $perPage
58 + * @param int $page
59 + *
60 + * @return ModelQueryBuilder
61 + */
62 + public function paginate($perPage, $page = 1): ModelQueryBuilder
63 + {
64 + return $this
65 + ->limit($perPage)
66 + ->offset(($page - 1) * $perPage);
67 + }
68 +
69 + /**
55 70 * Get row
56 71 *
57 72 * @since 2.19.6
58 73 *
59 74 * @return M|null
75 + *
76 + * @param int $output For inheritance compatibility only, unused.
60 77 */
61 78 public function get($output = OBJECT)
62 79 {
63 80 $row = DB::get_row($this->getSQL(), OBJECT);
@@ -74,8 +91,10 @@
74 91 *
75 92 * @since 2.19.6
76 93 *
77 94 * @return M[]|null
95 + *
96 + * @param int $output For inheritance compatibility only, unused.
78 97 */
79 98 public function getAll($output = OBJECT)
80 99 {
81 100 $results = DB::get_results($this->getSQL(), OBJECT);