Exemplo n.º 1
0
 /**
  * Constructor.
  *
  * @param Horde_Prefs_Identity $identity  The identity of the invited
  *                                        resource.
  * @param array $attendees                The attendees of the invitation.
  * @param string $reply_to                The selected identity for sending
  *                                        the reply.
  * @todo Parse mailto using parse_url
  */
 public function __construct($identity, $attendees, $reply_to)
 {
     $this->_identity = $identity;
     if (!is_array($attendees)) {
         $attendees = array($attendees);
     }
     foreach ($attendees as $attendee) {
         $attendee = preg_replace('/mailto:/i', '', $attendee);
         if (!is_null($id = $identity->getMatchingIdentity($attendee))) {
             $identity->setDefault($id);
             break;
         }
     }
     $this->_reply_to = $reply_to;
 }