| @@ 99-112 (lines=14) @@ | ||
| 96 | * @return \Sabre\DAV\INode |
|
| 97 | * @throws NotFound |
|
| 98 | */ |
|
| 99 | function getChild($name) { |
|
| 100 | try { |
|
| 101 | $comment = $this->commentsManager->get($name); |
|
| 102 | return new CommentNode( |
|
| 103 | $this->commentsManager, |
|
| 104 | $comment, |
|
| 105 | $this->userManager, |
|
| 106 | $this->userSession, |
|
| 107 | $this->logger |
|
| 108 | ); |
|
| 109 | } catch (NotFoundException $e) { |
|
| 110 | throw new NotFound(); |
|
| 111 | } |
|
| 112 | } |
|
| 113 | ||
| 114 | /** |
|
| 115 | * Returns an array with all the child nodes |
|
| @@ 91-103 (lines=13) @@ | ||
| 88 | * @return \Sabre\DAV\INode |
|
| 89 | * @throws NotFound |
|
| 90 | */ |
|
| 91 | function getChild($name) { |
|
| 92 | if(!$this->childExists($name)) { |
|
| 93 | throw new NotFound('Entity does not exist or is not available'); |
|
| 94 | } |
|
| 95 | return new EntityCollection( |
|
| 96 | $name, |
|
| 97 | $this->name, |
|
| 98 | $this->commentsManager, |
|
| 99 | $this->userManager, |
|
| 100 | $this->userSession, |
|
| 101 | $this->logger |
|
| 102 | ); |
|
| 103 | } |
|
| 104 | ||
| 105 | /** |
|
| 106 | * Returns an array with all the child nodes |
|