1 | <?php |
||
7 | final class Rule |
||
8 | { |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | private $selector; |
||
13 | |||
14 | /** |
||
15 | * @var array |
||
16 | */ |
||
17 | private $properties; |
||
18 | |||
19 | /** |
||
20 | * @var Specificity |
||
21 | */ |
||
22 | private $specificity; |
||
23 | |||
24 | /** |
||
25 | * @var integer |
||
26 | */ |
||
27 | private $order; |
||
28 | |||
29 | /** |
||
30 | * Rule constructor. |
||
31 | * |
||
32 | * @param string $selector |
||
33 | * @param Property[] $properties |
||
34 | * @param Specificity $specificity |
||
35 | * @param int $order |
||
36 | */ |
||
37 | public function __construct($selector, array $properties, Specificity $specificity, $order) |
||
38 | { |
||
39 | $this->selector = $selector; |
||
40 | $this->properties = $properties; |
||
41 | $this->specificity = $specificity; |
||
42 | $this->order = $order; |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * Get selector |
||
47 | * |
||
48 | * @return string |
||
49 | */ |
||
50 | public function getSelector() |
||
54 | |||
55 | /** |
||
56 | * Get properties |
||
57 | * |
||
58 | * @return array |
||
59 | */ |
||
60 | public function getProperties() |
||
64 | |||
65 | /** |
||
66 | * Get specificity |
||
67 | * |
||
68 | * @return Specificity |
||
69 | */ |
||
70 | public function getSpecificity() |
||
74 | |||
75 | /** |
||
76 | * Get order |
||
77 | * |
||
78 | * @return int |
||
79 | */ |
||
80 | public function getOrder() |
||
84 | } |
||
85 |