name = $name; $this->commentsManager = $commentsManager; $this->userSession = $userSession; } /** * Returns a specific child node, referenced by its name * * This method must throw Sabre\DAV\Exception\NotFound if the node does not * exist. * * @param string $name * @return \Sabre\DAV\INode * @throws NotFound */ public function getChild($name) { if (!$this->childExists($name)) { throw new NotFound('Entity does not exist or is not available'); } return new EntityCollection( $name, $this->name, $this->commentsManager, $this->userManager, $this->userSession, $this->logger ); } /** * Returns an array with all the child nodes * * @return \Sabre\DAV\INode[] * @throws MethodNotAllowed */ public function getChildren() { throw new MethodNotAllowed('No permission to list folder contents'); } /** * Checks if a child-node with the specified name exists * * @param string $name * @return bool */ public function childExists($name) { return call_user_func($this->childExistsFunction, $name); } }