當前位置: 首頁>>代碼示例>>PHP>>正文


PHP OC_Calendar_Object::findWhereDAVDataIs方法代碼示例

本文整理匯總了PHP中OC_Calendar_Object::findWhereDAVDataIs方法的典型用法代碼示例。如果您正苦於以下問題:PHP OC_Calendar_Object::findWhereDAVDataIs方法的具體用法?PHP OC_Calendar_Object::findWhereDAVDataIs怎麽用?PHP OC_Calendar_Object::findWhereDAVDataIs使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OC_Calendar_Object的用法示例。


在下文中一共展示了OC_Calendar_Object::findWhereDAVDataIs方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getCalendarObject

 /**
  * Returns information from a single calendar object, based on it's object
  * uri.
  *
  * The returned array must have the same keys as getCalendarObjects. The
  * 'calendardata' object is required here though, while it's not required
  * for getCalendarObjects.
  *
  * @param string $calendarId
  * @param string $objectUri
  * @return array
  */
 public function getCalendarObject($calendarId, $objectUri)
 {
     $data = OC_Calendar_Object::findWhereDAVDataIs($calendarId, $objectUri);
     if (is_array($data)) {
         $object = OC_VObject::parse($data['calendardata']);
         $object = OC_Calendar_Object::cleanByAccessClass($data['id'], $object);
         $data['calendardata'] = $object->serialize();
         $data = $this->OCAddETag($data);
     }
     return $data;
 }
開發者ID:CDN-Sparks,項目名稱:owncloud,代碼行數:23,代碼來源:backend.php

示例2: getCalendarObject

 /**
  * Returns information from a single calendar object, based on it's object
  * uri.
  *
  * The returned array must have the same keys as getCalendarObjects. The
  * 'calendardata' object is required here though, while it's not required
  * for getCalendarObjects.
  *
  * @param string $calendarId
  * @param string $objectUri
  * @return array
  */
 public function getCalendarObject($calendarId, $objectUri)
 {
     if ($calendarId === 'contact_birthdays') {
         $objectUri = substr($objectUri, 0, strlen($objectUri) - 4);
         $objectUriArray = explode('::', $objectUri);
         if (count($objectUriArray) === 3) {
             $app = new \OCA\Contacts\App();
             list($backend, $addressBookId, $contactId) = $objectUriArray;
             $contact = $app->getContact($backend, $addressBookId, $contactId);
             $vevent = $contact->getBirthdayEvent();
             if (is_null($vevent)) {
                 return false;
             }
             return $this->OCAddETag(array('id' => 0, 'calendarid' => 'contact_birthdays', 'uri' => $contact->getBackend()->name . '::' . $contact->getParent()->getId() . '::' . $contact->getId() . '.ics', 'lastmodified' => $contact->lastModified(), 'calendardata' => $vevent->serialize()));
         }
     }
     $data = OC_Calendar_Object::findWhereDAVDataIs($calendarId, $objectUri);
     if (is_array($data)) {
         $data = $this->OCAddETag($data);
         $object = \Sabre\VObject\Reader::read($data['calendardata']);
         if (!$object) {
             return false;
         }
         $object = OC_Calendar_Object::cleanByAccessClass($data['id'], $object);
         $data['calendardata'] = $object->serialize();
     }
     return $data;
 }
開發者ID:AlfredoCubitos,項目名稱:calendar,代碼行數:40,代碼來源:backend.php

示例3: getCalendarObject

 /**
  * Returns information from a single calendar object, based on it's object
  * uri.
  *
  * The returned array must have the same keys as getCalendarObjects. The
  * 'calendardata' object is required here though, while it's not required
  * for getCalendarObjects.
  *
  * @param string $calendarId
  * @param string $objectUri
  * @return array
  */
 public function getCalendarObject($calendarId, $objectUri)
 {
     $data = OC_Calendar_Object::findWhereDAVDataIs($calendarId, $objectUri);
     if (is_array($data)) {
         $data = $this->OCAddETag($data);
     }
     return $data;
 }
開發者ID:jaeindia,項目名稱:ownCloud-Enhancements,代碼行數:20,代碼來源:connector_sabre.php


注:本文中的OC_Calendar_Object::findWhereDAVDataIs方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。