/** * Checks if a child-node exists. * * @param string $name * @return bool */ public function childExists($name) { $obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'], $name); if (!$obj) { return false; } else { return true; } }
/** * Returns a calendar object * * The contained calendar objects are for example Events or Todo's. * * @param string $name * @return Sabre_DAV_ICalendarObject */ public function getChild($name) { if (!$this->hasPrivilege()) { throw new Sabre_DAV_Exception_Forbidden('Permission denied to access this calendar'); } $obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'], $name); if (!$obj) { throw new Sabre_DAV_Exception_FileNotFound('Calendar object not found'); } return new Sabre_CalDAV_CalendarObject($this->caldavBackend, $this->calendarInfo, $obj); }
/** * Checks if a child-node exists. * * @param string $name * @return bool */ public function childExists($name) { if (!$this->hasPrivilege()) { throw new Sabre_DAV_Exception_Forbidden('Permission denied to access this calendar'); } $obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'], $name); if (!$obj) { return false; } else { return true; } }