| 1 |
<?php |
| 2 |
|
| 3 |
namespace Elementor\Modules\AtomicWidgets\PropsResolver; |
| 4 |
|
| 5 |
use Elementor\Modules\AtomicWidgets\PropTypes\Contracts\Transformable_Prop_Type; |
| 6 |
|
| 7 |
if ( ! defined( 'ABSPATH' ) ) { |
| 8 |
exit; // Exit if accessed directly. |
| 9 |
} |
| 10 |
|
| 11 |
class Props_Resolver_Context { |
| 12 |
private ?string $key = null; |
| 13 |
|
| 14 |
private ?Transformable_Prop_Type $prop_type; |
| 15 |
|
| 16 |
private bool $disabled = false; |
| 17 |
|
| 18 |
public static function make(): self { |
| 19 |
return new static(); |
| 20 |
} |
| 21 |
|
| 22 |
public function set_key( ?string $key ): self { |
| 23 |
$this->key = $key; |
| 24 |
|
| 25 |
return $this; |
| 26 |
} |
| 27 |
|
| 28 |
public function set_disabled( bool $disabled ): self { |
| 29 |
$this->disabled = $disabled; |
| 30 |
|
| 31 |
return $this; |
| 32 |
} |
| 33 |
|
| 34 |
public function set_prop_type( Transformable_Prop_Type $prop_type ): self { |
| 35 |
$this->prop_type = $prop_type; |
| 36 |
|
| 37 |
return $this; |
| 38 |
} |
| 39 |
|
| 40 |
public function get_key(): ?string { |
| 41 |
return $this->key; |
| 42 |
} |
| 43 |
|
| 44 |
public function is_disabled(): bool { |
| 45 |
return $this->disabled; |
| 46 |
} |
| 47 |
|
| 48 |
public function get_prop_type(): ?Transformable_Prop_Type { |
| 49 |
return $this->prop_type; |
| 50 |
} |
| 51 |
} |
| 52 |
|