| 1 |
<?php |
| 2 |
|
| 3 |
namespace Elementor\Modules\AtomicWidgets\CssConverter; |
| 4 |
|
| 5 |
if ( ! defined( 'ABSPATH' ) ) { |
| 6 |
exit; // Exit if accessed directly. |
| 7 |
} |
| 8 |
|
| 9 |
class Expander_Registry { |
| 10 |
/** |
| 11 |
* @var Shorthand_Expander[] |
| 12 |
*/ |
| 13 |
private array $expanders = []; |
| 14 |
|
| 15 |
public function register( Shorthand_Expander $expander ): self { |
| 16 |
$this->expanders[] = $expander; |
| 17 |
|
| 18 |
return $this; |
| 19 |
} |
| 20 |
|
| 21 |
/** |
| 22 |
* Expanders in registration order. The dispatcher applies the first one that supports a rule. |
| 23 |
* |
| 24 |
* @return Shorthand_Expander[] |
| 25 |
*/ |
| 26 |
public function all(): array { |
| 27 |
return $this->expanders; |
| 28 |
} |
| 29 |
} |
| 30 |
|