1 | <?php |
||
54 | abstract class AbstractObject implements ObjectInterface |
||
55 | { |
||
56 | /** |
||
57 | * System properties |
||
58 | * |
||
59 | * @var SystemProperties |
||
60 | */ |
||
61 | protected $_systemProperties; |
||
62 | /** |
||
63 | * Meta properties |
||
64 | * |
||
65 | * @var MetaProperties |
||
66 | */ |
||
67 | protected $_metaProperties; |
||
68 | /** |
||
69 | * Domain properties |
||
70 | * |
||
71 | * @var AbstractDomainProperties |
||
72 | */ |
||
73 | protected $_domainProperties; |
||
74 | /** |
||
75 | * Object relations |
||
76 | * |
||
77 | * @var Relations |
||
78 | */ |
||
79 | private $_relations; |
||
80 | /** |
||
81 | * Processing instructions |
||
82 | * |
||
83 | * @var ProcessingInstructions |
||
84 | */ |
||
85 | private $_processingInstructions; |
||
86 | /** |
||
87 | * Object payload |
||
88 | * |
||
89 | * @var string |
||
90 | */ |
||
91 | protected $_payload; |
||
92 | /** |
||
93 | * Repository path |
||
94 | * |
||
95 | * @var RepositoryPathInterface |
||
96 | */ |
||
97 | protected $_path; |
||
98 | /** |
||
99 | * Domain property collection class |
||
100 | * |
||
101 | * @var string |
||
102 | */ |
||
103 | protected $_domainPropertyCollectionClass = null; |
||
104 | |||
105 | /** |
||
106 | * Object constructor |
||
107 | * |
||
108 | * @param RepositoryPathInterface $path Object repository path |
||
109 | * @param array $propertyData Property data |
||
110 | * @param string $payload Object payload |
||
111 | * @throws PropertyInvalidArgumentException If the domain property collection class is invalid |
||
112 | */ |
||
113 | 2 | public function __construct(RepositoryPathInterface $path, array $propertyData = [], $payload = '') |
|
159 | |||
160 | /** |
||
161 | * Return the object ID |
||
162 | * |
||
163 | * @return Id Object ID |
||
164 | */ |
||
165 | public function getId() |
||
169 | |||
170 | /** |
||
171 | * Return the object type |
||
172 | * |
||
173 | * @return Type Object type |
||
174 | */ |
||
175 | public function getType() |
||
179 | |||
180 | /** |
||
181 | * Return the object revision |
||
182 | * |
||
183 | * @return Revision Object revision |
||
184 | */ |
||
185 | public function getRevision() |
||
189 | |||
190 | /** |
||
191 | * Return the creation date & time |
||
192 | * |
||
193 | * @return \DateTimeImmutable Creation date & time |
||
194 | */ |
||
195 | public function getCreated() |
||
199 | |||
200 | /** |
||
201 | * Return the publication date & time |
||
202 | * |
||
203 | * @return \DateTimeImmutable Publication date & time |
||
204 | */ |
||
205 | public function getPublished() |
||
209 | |||
210 | /** |
||
211 | * Return all object keywords |
||
212 | * |
||
213 | * @return array Object keywords |
||
214 | */ |
||
215 | 1 | public function getKeywords() |
|
219 | |||
220 | /** |
||
221 | * Return all object categories |
||
222 | * |
||
223 | * @return array Object categories |
||
224 | */ |
||
225 | 1 | public function getCategories() |
|
229 | |||
230 | /** |
||
231 | * Return all object authors |
||
232 | * |
||
233 | * @return AuthorInterface[] Authors |
||
234 | */ |
||
235 | 1 | public function getAuthors() |
|
239 | |||
240 | /** |
||
241 | * Add an object author |
||
242 | * |
||
243 | * @param AuthorInterface $author Author |
||
244 | * @return ObjectInterface Self reference |
||
245 | */ |
||
246 | public function addAuthor(AuthorInterface $author) |
||
253 | |||
254 | /** |
||
255 | * Return the object repository path |
||
256 | * |
||
257 | * @return RepositoryPathInterface Object repository path |
||
258 | */ |
||
259 | 1 | public function getRepositoryPath() |
|
263 | |||
264 | /** |
||
265 | * Return the absolute object URL |
||
266 | * |
||
267 | * @return string |
||
268 | */ |
||
269 | public function getAbsoluteUrl() |
||
273 | } |
||
274 |