1 | <?php |
||
51 | class ObjectProxy implements ObjectInterface |
||
52 | { |
||
53 | /** |
||
54 | * Apparat object URL |
||
55 | * |
||
56 | * @var ApparatUrl |
||
57 | */ |
||
58 | protected $_url = null; |
||
59 | /** |
||
60 | * Object |
||
61 | * |
||
62 | * @var ObjectInterface |
||
63 | */ |
||
64 | protected $_object = null; |
||
65 | |||
66 | /******************************************************************************* |
||
67 | * PUBLIC METHODS |
||
68 | *******************************************************************************/ |
||
69 | |||
70 | /** |
||
71 | * Object proxy constructor |
||
72 | * |
||
73 | * @param ApparatUrl $url Apparat object URL |
||
74 | */ |
||
75 | 2 | public function __construct(ApparatUrl $url) |
|
79 | |||
80 | /** |
||
81 | * Return the object repository path |
||
82 | * |
||
83 | * @return PathInterface Object repository path |
||
84 | */ |
||
85 | public function getRepositoryPath() |
||
96 | |||
97 | /** |
||
98 | * Return the object ID |
||
99 | * |
||
100 | * @return Id Object ID |
||
101 | */ |
||
102 | public function getId() |
||
106 | |||
107 | /** |
||
108 | * Return the enclosed remote object |
||
109 | * |
||
110 | * @return ObjectInterface Remote object |
||
111 | */ |
||
112 | protected function _object() |
||
123 | |||
124 | /** |
||
125 | * Return the object type |
||
126 | * |
||
127 | * @return Type Object type |
||
128 | */ |
||
129 | public function getType() |
||
133 | |||
134 | /** |
||
135 | * Return the object revision |
||
136 | * |
||
137 | * @return Revision Object revision |
||
138 | */ |
||
139 | public function getRevision() |
||
143 | |||
144 | /** |
||
145 | * Return the creation date & time |
||
146 | * |
||
147 | * @return \DateTimeImmutable Creation date & time |
||
148 | */ |
||
149 | public function getCreated() |
||
153 | |||
154 | /** |
||
155 | * Return the publication date & time |
||
156 | * |
||
157 | * @return \DateTimeImmutable Publication date & time |
||
158 | */ |
||
159 | public function getPublished() |
||
163 | |||
164 | /** |
||
165 | * Return the object description |
||
166 | * |
||
167 | * @return string Object description |
||
168 | */ |
||
169 | public function getDescription() |
||
173 | |||
174 | /** |
||
175 | * Return the object abstract |
||
176 | * |
||
177 | * @return string Object abstract |
||
178 | */ |
||
179 | public function getAbstract() |
||
183 | |||
184 | /** |
||
185 | * Return all object keywords |
||
186 | * |
||
187 | * @return array Object keywords |
||
188 | */ |
||
189 | public function getKeywords() |
||
193 | |||
194 | /** |
||
195 | * Return all object categories |
||
196 | * |
||
197 | * @return array Object categories |
||
198 | */ |
||
199 | public function getCategories() |
||
203 | |||
204 | /** |
||
205 | * Return all object authors |
||
206 | * |
||
207 | * @return AuthorInterface[] Authors |
||
208 | */ |
||
209 | public function getAuthors() |
||
213 | |||
214 | /** |
||
215 | * Add an object author |
||
216 | * |
||
217 | * @param AuthorInterface $author Author |
||
218 | * @return ObjectInterface Self reference |
||
219 | */ |
||
220 | public function addAuthor(AuthorInterface $author) |
||
224 | |||
225 | /******************************************************************************* |
||
226 | * MAGIG METHODS |
||
227 | *******************************************************************************/ |
||
228 | |||
229 | /** |
||
230 | * Return the absolute object URL |
||
231 | * |
||
232 | * @return string |
||
233 | */ |
||
234 | 2 | public function getAbsoluteUrl() |
|
238 | |||
239 | /******************************************************************************* |
||
240 | * PRIVATE METHODS |
||
241 | *******************************************************************************/ |
||
242 | |||
243 | /** |
||
244 | * Generic caller |
||
245 | * |
||
246 | * @param string $name Method name |
||
247 | * @param array $arguments Method arguments |
||
248 | */ |
||
249 | public function __call($name, $arguments) |
||
261 | } |
||
262 |