当前位置: 首页>>代码示例>>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;未经允许,请勿转载。