PluginProbe
Elementor Website Builder – more than just a page builder / trunk
Elementor Website Builder – more than just a page builder vtrunk
4.3.3 4.3.2 4.3.1 4.3.0 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 All 456 releases
elementor / modules / mcp / abilities / appliers / v3 / serializer / v3-block-accumulator.php

v3-block-accumulator.php in Elementor Website Builder – more than just a page builder trunk, at modules/mcp/abilities/appliers/v3/serializer/v3-block-accumulator.php

33 lines 800 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Elementor\Modules\Mcp\Abilities\Appliers\V3\Serializer;
4
5 if ( ! defined( 'ABSPATH' ) ) {
6 exit;
7 }
8
9 /**
10 * Groups CSS declarations by breakpoint + pseudo-state for the serializer's output.
11 *
12 * Structure: blocks[breakpoint][state][property] = value
13 * where state === '' represents the base (no pseudo-state) group.
14 */
15 class V3_Block_Accumulator {
16
17 /** @var array<string, array<string, array<string, string>>> */
18 private array $blocks = [];
19
20 public function push( string $breakpoint, ?string $state, string $property, string $value ): void {
21 $state_key = $state ?? '';
22
23 $this->blocks[ $breakpoint ][ $state_key ][ $property ] = $value;
24 }
25
26 /**
27 * @return array<string, array<string, array<string, string>>>
28 */
29 public function all(): array {
30 return $this->blocks;
31 }
32 }
33