示例#1
0
 public function updateContactItem(Type\ItemIdType $itemId, $changes)
 {
     //Create the request
     $request = array('ItemChange' => array('ItemId' => $itemId->toArray(), 'Updates' => API\ItemUpdateBuilder::buildUpdateItemChanges('Contact', 'contacts', $changes)));
     $options = array();
     $items = $this->updateItems($request, $options);
     if (!is_array($items)) {
         $items = array($items);
     }
     return $items;
 }
示例#2
0
文件: API.php 项目: garethp/php-ews
 /**
  * @param Type\ItemIdType $itemId
  * @param $fromType
  * @param $destinationType
  * @param $mailbox
  *
  * @return Type\ItemIdType
  */
 public function convertIdFormat(Type\ItemIdType $itemId, $fromType, $destinationType, $mailbox)
 {
     $result = $this->getClient()->ConvertId(array('DestinationFormat' => $destinationType, 'SourceIds' => array('AlternateId' => array('Format' => $fromType, 'Id' => $itemId->getId(), 'Mailbox' => $mailbox))));
     $itemId->setId($result->getId());
     return $itemId;
 }
示例#3
0
 /**
  * @param Type\ItemIdType $itemId
  * @param string $message
  * @param string $sensitivity
  * @param array $options
  *
  * @return Type\ItemIdType[]
  */
 public function acceptMeeting($itemId, $message, $sensitivity = 'Private', $options = array())
 {
     $request = array('AcceptItem' => array('Sensitivity' => $sensitivity, 'Body' => array('BodyType' => 'HTML', '_value' => $message), 'ReferenceItemId' => $itemId->toArray()));
     $defaultOptions = array('MessageDisposition' => 'SendOnly');
     $options = array_replace_recursive($defaultOptions, $options);
     $return = $this->createItems($request, $options)->getCalendarItem();
     if (!is_array($request)) {
         $return = array($return);
     }
     return $return;
 }