PluginProbe
Elementor Website Builder – more than just a page builder / 3.35.7
Elementor Website Builder – more than just a page builder v3.35.7
4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 All 452 releases
← All changes | modules/variables/storage/variables-collection.php +6 -3 4.2.23.35.7 View file →
@@ -14,8 +14,11 @@
14 14 * performing immutable process ( creating new instances )
15 15 * we will see if we need to extend collection as time goes on
16 16 */
17 17 class Variables_Collection extends Collection {
18 + const FORMAT_VERSION_V1 = 1;
19 + const FORMAT_VERSION_V2 = 2;
20 + const TOTAL_VARIABLES_COUNT = 100;
18 21
19 22 private int $watermark;
20 23
21 24 private int $version;
@@ -24,9 +27,9 @@
24 27 parent::__construct();
25 28
26 29 $this->items = $items;
27 30 $this->watermark = $watermark;
28 - $this->version = $version ?? Constants::FORMAT_VERSION_V1;
31 + $this->version = $version ?? self::FORMAT_VERSION_V1;
29 32 }
30 33
31 34 public static function hydrate( array $record ): self {
32 35 $variables = [];
@@ -72,9 +75,9 @@
72 75 public static function default(): self {
73 76 return new self(
74 77 [],
75 78 0,
76 - Constants::FORMAT_VERSION_V1
79 + self::FORMAT_VERSION_V1
77 80 );
78 81 }
79 82
80 83 public function watermark(): int {
@@ -140,9 +143,9 @@
140 143 ++$active_count;
141 144 }
142 145 }
143 146
144 - if ( Constants::TOTAL_VARIABLES_COUNT <= $active_count ) {
147 + if ( self::TOTAL_VARIABLES_COUNT <= $active_count ) {
145 148 throw new VariablesLimitReached( 'Total variables count limit reached' );
146 149 }
147 150 }
148 151