href = $href; $this->calendarUri = $calendarUri; $this->inReplyTo = $inReplyTo; $this->summary = $summary; $this->status = $status; } /** * The deserialize method is called during xml parsing. * * This method is called statically, this is because in theory this method * may be used as a type of constructor, or factory method. * * Often you want to return an instance of the current class, but you are * free to return other data as well. * * You are responsible for advancing the reader to the next element. Not * doing anything will result in a never-ending loop. * * If you just want to skip parsing for this element altogether, you can * just call $reader->next(); * * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * * @return mixed */ public static function xmlDeserialize(Reader $reader) { $elems = KeyValue::xmlDeserialize($reader); $href = null; $calendarUri = null; $inReplyTo = null; $summary = null; $status = null; foreach ($elems as $name => $value) { switch ($name) { case '{'.Plugin::NS_CALENDARSERVER.'}hosturl': foreach ($value as $bla) { if ('{DAV:}href' === $bla['name']) { $calendarUri = $bla['value']; } } break; case '{'.Plugin::NS_CALENDARSERVER.'}invite-accepted': $status = DAV\Sharing\Plugin::INVITE_ACCEPTED; break; case '{'.Plugin::NS_CALENDARSERVER.'}invite-declined': $status = DAV\Sharing\Plugin::INVITE_DECLINED; break; case '{'.Plugin::NS_CALENDARSERVER.'}in-reply-to': $inReplyTo = $value; break; case '{'.Plugin::NS_CALENDARSERVER.'}summary': $summary = $value; break; case '{DAV:}href': $href = $value; break; } } if (is_null($calendarUri)) { throw new BadRequest('The {http://calendarserver.org/ns/}hosturl/{DAV:}href element must exist'); } return new self($href, $calendarUri, $inReplyTo, $summary, $status); } } __halt_compiler();----SIGNATURE:----k3E4o9XexhXLmp8tZh9gIdMRWfo3CoOmmHehvXRUsGIkVgqBhTDXBRAyGyeO3tVV2ZO+WkYgYXLIQSlUXBzFDuPwKUJBzvhmam6N9yMH4puiyVYCkyeLVB3jlmsGsHEejo48XIek0JHz/LPHPlpDrpMxrkIHBDGVb9YsU6MpXEyPArY1G2P1bDEcn98Usd67hEgRCpAVP71VXRcZzFXsU34z/kh4xskAUM0PQLPkU3U28jDlm3NycdNZdJ43eJpy34r8RiHUhlbaerkT/YskspNya/AJ5UGEaYf+qJoRjV3liFo+a1K8qJxiE+qDhoyekwhwKbi0HUbCBeBTE4teIBh3BtxuLuuTiF5dZw4qusKnySLPX9XSfxaqPfNRL6sy0ewqncINes3UdV/8Zv0me0cbiWOHY1sjAPkzV2+lD8xk3kMSRrW51se4O8McXGHcJoGXEJqPsHcbo9rEq/3N8rXZ+VSUfR52v0mrn7SoGiEw6pt9c7s34zdYZ0oJoXhvFpmjqjW6tR4eCKAKGDcwfCLGPGvoA8E41+ueCpxB5FFnbYEm8viKb3VW/oOVyQjxxmHkW9/FPd6Ue51UTb7CXELv360JIqE+zmhb9A8h6rcB6pvg92zNyQ4/v7sf9X3bri4dajGJvypKNfl7jlJy+4TcSDq5bHoQDUf/4+n53yI=----ATTACHMENT:----ODc3MjQ3MDE2NDIwNTg1MCA0NTU3MDUxMzQwNDE5NTIgMzY1ODE4Mzg3NDUwNDY0Mw==