| 1 | <?php |
||
| 7 | final class Property |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | private $name; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | private $value; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var Specificity |
||
| 21 | */ |
||
| 22 | private $originalSpecificity; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Property constructor. |
||
| 26 | * @param $name |
||
| 27 | * @param $value |
||
| 28 | * @param Specificity|null $specificity |
||
| 29 | */ |
||
| 30 | public function __construct($name, $value, Specificity $specificity = null) |
||
| 31 | { |
||
| 32 | $this->name = $name; |
||
| 33 | $this->value = $value; |
||
| 34 | $this->originalSpecificity = $specificity; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Get name |
||
| 39 | * |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | public function getName() |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Get value |
||
| 49 | * |
||
| 50 | * @return string |
||
| 51 | */ |
||
| 52 | public function getValue() |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Get originalSpecificity |
||
| 59 | * |
||
| 60 | * @return Specificity |
||
| 61 | */ |
||
| 62 | public function getOriginalSpecificity() |
||
| 66 | |||
| 67 | /** |
||
| 68 | * Is this property important? |
||
| 69 | * |
||
| 70 | * @return bool |
||
| 71 | */ |
||
| 72 | public function isImportant() |
||
| 76 | |||
| 77 | /** |
||
| 78 | * Get the textual representation of the property |
||
| 79 | * |
||
| 80 | * @return string |
||
| 81 | */ |
||
| 82 | public function toString() |
||
| 90 | } |
||
| 91 |