PluginProbe
Elementor Website Builder – more than just a page builder / 4.3.0-beta3
Elementor Website Builder – more than just a page builder v4.3.0-beta3
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
elementor / modules / atomic-widgets / utils / atomic-prop-remap-registry.php

atomic-prop-remap-registry.php in Elementor Website Builder – more than just a page builder 4.3.0-beta3, at modules/atomic-widgets/utils/atomic-prop-remap-registry.php

31 lines 638 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\AtomicWidgets\Utils;
4
5 if ( ! defined( 'ABSPATH' ) ) {
6 exit; // Exit if accessed directly.
7 }
8
9 class Atomic_Prop_Remap_Registry {
10 /**
11 * @var array<string, callable>
12 */
13 private static array $handlers = [];
14
15 public static function register( string $type, callable $handler ): void {
16 self::$handlers[ $type ] = $handler;
17 }
18
19 public static function get( string $type ): ?callable {
20 return self::$handlers[ $type ] ?? null;
21 }
22
23 public static function has( string $type ): bool {
24 return isset( self::$handlers[ $type ] );
25 }
26
27 public static function reset(): void {
28 self::$handlers = [];
29 }
30 }
31