1 | <?php |
||
47 | abstract class AbstractProperties implements PropertiesInterface |
||
48 | { |
||
49 | /** |
||
50 | * Property data |
||
51 | * |
||
52 | * @var array |
||
53 | */ |
||
54 | protected $data = []; |
||
55 | /** |
||
56 | * Owner object |
||
57 | * |
||
58 | * @var ObjectInterface |
||
59 | */ |
||
60 | protected $object = null; |
||
61 | |||
62 | /** |
||
63 | * Meta properties constructor |
||
64 | * |
||
65 | * @param array $data Property data |
||
66 | * @param ObjectInterface $object Owner object |
||
67 | */ |
||
68 | 22 | public function __construct(array $data, ObjectInterface $object) |
|
73 | |||
74 | /** |
||
75 | * Return the owner object |
||
76 | * |
||
77 | * @return ObjectInterface Owner object |
||
78 | */ |
||
79 | 17 | public function getObject() |
|
83 | |||
84 | /** |
||
85 | * Normalize and sort a property value list |
||
86 | * |
||
87 | * @param array $values Property values |
||
88 | * @return array Normalized and sorted property values |
||
89 | */ |
||
90 | 17 | protected function normalizeSortedPropertyValues(array $values) |
|
96 | |||
97 | /** |
||
98 | * Mutate a string property |
||
99 | * |
||
100 | * @param string $property Property name |
||
101 | * @param string $value New value |
||
102 | * @return $this|AbstractProperties Self reference or clone |
||
103 | */ |
||
104 | 1 | protected function mutateStringProperty($property, $value) |
|
117 | |||
118 | /** |
||
119 | * Mutate a list property |
||
120 | * |
||
121 | * @param string $property Property name |
||
122 | * @param array $values New values |
||
123 | * @return $this|AbstractProperties Self reference or clone |
||
124 | */ |
||
125 | 1 | protected function mutateListProperty($property, array $values) |
|
137 | } |
||
138 |