PluginProbe
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments / 1.2.5
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments v1.2.5
4.7.2 4.7.1 4.7.0 4.6.6 4.6.5 4.6.4 4.6.3 4.6.2 4.6.1 4.6.0 4.5.1 4.5.0 4.4.2 4.4.1 4.4.0 4.3.3 4.3.2 4.3.1 4.3.0 4.2.3 4.2.2 4.2.1 1.0.3 1.0.4 1.0.5 All 281 releases
← All changes | app/src/Models/Collection.php +1 -20 4.2.21.2.5 View file →
@@ -24,9 +24,9 @@
24 24 *
25 25 * @param object $collection Optional attributes.
26 26 */
27 27 public function __construct( $collection ) {
28 - $this->attributes = (object) $collection;
28 + $this->attributes = $collection;
29 29 }
30 30
31 31 /**
32 32 * Get the called class name
@@ -37,26 +37,8 @@
37 37 return str_replace( '\\', '_', get_called_class() );
38 38 }
39 39
40 40 /**
41 - * Get the total.
42 - *
43 - * @return string
44 - */
45 - public function total() {
46 - return $this->pagination->count ?? 0;
47 - }
48 -
49 - /**
50 - * Get the total pages.
51 - *
52 - * @return string
53 - */
54 - public function totalPages() {
55 - return ceil( ( $this->pagination->count ?? 0 ) / ( $this->pagination->limit ?? 1 ) );
56 - }
57 -
58 - /**
59 41 * Does this collection have a next page?
60 42 *
61 43 * @return boolean
62 44 */
@@ -140,9 +122,8 @@
140 122 *
141 123 * @param mixed $offset Name.
142 124 * @return mixed
143 125 */
144 - #[\ReturnTypeWillChange]
145 126 public function offsetGet( $offset ) {
146 127 return $this->getAttribute( $offset );
147 128 }
148 129