Property.php
67 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Handles CSS properties. |
| 4 | * Extend this class in order to handle exceptions. |
| 5 | * |
| 6 | * @package Kirki |
| 7 | * @subpackage Controls |
| 8 | * @copyright Copyright (c) 2023, Themeum |
| 9 | * @license https://opensource.org/licenses/MIT |
| 10 | * @since 2.2.0 |
| 11 | */ |
| 12 | |
| 13 | namespace Kirki\Module\CSS; |
| 14 | |
| 15 | /** |
| 16 | * Output for CSS properties. |
| 17 | */ |
| 18 | class Property { |
| 19 | |
| 20 | /** |
| 21 | * The property we're modifying. |
| 22 | * |
| 23 | * @access protected |
| 24 | * @var string |
| 25 | */ |
| 26 | protected $property; |
| 27 | |
| 28 | /** |
| 29 | * The value |
| 30 | * |
| 31 | * @access protected |
| 32 | * @var string|array |
| 33 | */ |
| 34 | protected $value; |
| 35 | |
| 36 | /** |
| 37 | * Constructor. |
| 38 | * |
| 39 | * @access public |
| 40 | * @param string $property The CSS property we're modifying. |
| 41 | * @param mixed $value The value. |
| 42 | */ |
| 43 | public function __construct( $property, $value ) { |
| 44 | $this->property = $property; |
| 45 | $this->value = $value; |
| 46 | $this->process_value(); |
| 47 | } |
| 48 | |
| 49 | /** |
| 50 | * Modifies the value. |
| 51 | * |
| 52 | * @access protected |
| 53 | */ |
| 54 | protected function process_value() { |
| 55 | |
| 56 | } |
| 57 | |
| 58 | /** |
| 59 | * Gets the value. |
| 60 | * |
| 61 | * @access protected |
| 62 | */ |
| 63 | public function get_value() { |
| 64 | return $this->value; |
| 65 | } |
| 66 | } |
| 67 |