| @@ 34-46 (lines=13) @@ | ||
| 31 | * @throws NotFound |
|
| 32 | * @return PublicCalendarObject |
|
| 33 | */ |
|
| 34 | public function getChild($name) { |
|
| 35 | $obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'], $name); |
|
| 36 | ||
| 37 | if (!$obj) { |
|
| 38 | throw new NotFound('Calendar object not found'); |
|
| 39 | } |
|
| 40 | if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE) { |
|
| 41 | throw new NotFound('Calendar object not found'); |
|
| 42 | } |
|
| 43 | $obj['acl'] = $this->getChildACL(); |
|
| 44 | ||
| 45 | return new PublicCalendarObject($this->caldavBackend, $this->calendarInfo, $obj); |
|
| 46 | } |
|
| 47 | ||
| 48 | /** |
|
| 49 | * @return PublicCalendarObject[] |
|
| @@ 231-247 (lines=17) @@ | ||
| 228 | } |
|
| 229 | } |
|
| 230 | ||
| 231 | public function getChild($name) { |
|
| 232 | ||
| 233 | $obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'], $name); |
|
| 234 | ||
| 235 | if (!$obj) { |
|
| 236 | throw new NotFound('Calendar object not found'); |
|
| 237 | } |
|
| 238 | ||
| 239 | if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE && $this->isShared()) { |
|
| 240 | throw new NotFound('Calendar object not found'); |
|
| 241 | } |
|
| 242 | ||
| 243 | $obj['acl'] = $this->getChildACL(); |
|
| 244 | ||
| 245 | return new CalendarObject($this->caldavBackend, $this->calendarInfo, $obj); |
|
| 246 | ||
| 247 | } |
|
| 248 | ||
| 249 | public function getChildren() { |
|
| 250 | ||