Copyright 2010 Klarälvdalens Datakonsult AB Copyright 2010-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see {@link http://www.horde.org/licenses/lgpl21 LGPL}.
Author: Gunnar Wrobel (wrobel@pardus.de)
示例#1
0
 /**
  * Return the response as a MIME message.
  *
  * @param Horde_Itip_Response_Type    $type    The response type.
  * @param Horde_Itip_Response_Options $options The options for the response.
  *
  * @return array A list of two object: The mime headers and the mime
  *               message.
  */
 public function getMessage(Horde_Itip_Response_Type $type, Horde_Itip_Response_Options $options)
 {
     $message = new Horde_Mime_Part();
     $message->setType('text/calendar');
     $options->prepareIcsMimePart($message);
     $message->setContents($this->getIcalendar($type, $options)->exportvCalendar());
     $message->setEOL("\r\n");
     $this->_setIcsFilename($message);
     $message->setContentTypeParameter('METHOD', 'REPLY');
     // Build the reply headers.
     $from = $this->_resource->getFrom();
     $reply_to = $this->_resource->getReplyTo();
     $headers = new Horde_Mime_Headers();
     $headers->addHeaderOb(Horde_Mime_Headers_Date::create());
     $headers->addHeader('From', $from);
     $headers->addHeader('To', $this->_request->getOrganizer());
     if (!empty($reply_to) && $reply_to != $from) {
         $headers->addHeader('Reply-to', $reply_to);
     }
     $headers->addHeader('Subject', $type->getSubject());
     $options->prepareResponseMimeHeaders($headers);
     return array($headers, $message);
 }
示例#2
0
 /**
  * Copy the organizer from the request into the provided iTip instance.
  *
  * @return NULL
  */
 private function copyOrganizer(Horde_Itip_Event $itip)
 {
     $itip->setOrganizer($this->getRawOrganizer(), $this->getOrganizerParameters());
 }