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