principalBackend, $this->principalProperties); if ($name === 'calendar-proxy-write') return new Sabre_CalDAV_Principal_ProxyWrite($this->principalBackend, $this->principalProperties); throw new Sabre_DAV_Exception_FileNotFound('Node with name ' . $name . ' was not found'); } /** * Returns an array with all the child nodes * * @return Sabre_DAV_INode[] */ public function getChildren() { return array( new Sabre_CalDAV_Principal_ProxyRead($this->principalBackend, $this->principalProperties), new Sabre_CalDAV_Principal_ProxyWrite($this->principalBackend, $this->principalProperties), ); } /** * Checks if a child-node with the specified name exists * * @return bool */ public function childExists($name) { return $name === 'calendar-proxy-read' || $name === 'calendar-proxy-write'; } /** * Returns a list of ACE's for this node. * * Each ACE has the following properties: * * 'privilege', a string such as {DAV:}read or {DAV:}write. These are * currently the only supported privileges * * 'principal', a url to the principal who owns the node * * 'protected' (optional), indicating that this ACE is not allowed to * be updated. * * @return array */ public function getACL() { return array( array( 'privilege' => '{DAV:}read', 'principal' => $this->principalProperties['uri'], 'protected' => true, ), array( 'privilege' => '{DAV:}read', 'principal' => $this->principalProperties['uri'] . '/calendar-proxy-read', 'protected' => true, ), array( 'privilege' => '{DAV:}read', 'principal' => $this->principalProperties['uri'] . '/calendar-proxy-write', 'protected' => true, ), ); } }