value = $value; } /** * Returns the current value. * * @return string */ public function getValue() { return $this->value; } /** * The xmlSerialize method is called during xml writing. * * Use the $writer argument to write its own xml serialization. * * An important note: do _not_ create a parent element. Any element * implementing XmlSerializable should only ever write what's considered * its 'inner xml'. * * The parent of the current element is responsible for writing a * containing element. * * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. */ public function xmlSerialize(Writer $writer) { switch ($this->value) { case self::TRANSPARENT: $writer->writeElement('{'.Plugin::NS_CALDAV.'}transparent'); break; case self::OPAQUE: $writer->writeElement('{'.Plugin::NS_CALDAV.'}opaque'); break; } } /** * 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 = Deserializer\enum($reader, Plugin::NS_CALDAV); if (in_array('transparent', $elems)) { $value = self::TRANSPARENT; } else { $value = self::OPAQUE; } return new self($value); } } __halt_compiler();----SIGNATURE:----qksDe7pPGG0jK/uKS/qJJpPnS1hOo36zZ3coj2+LuQnkv0/IMFEKHEyWYlpsRzx0BvE6RvIhcBJTtK9CYgryFmh//cOjWkFzue5/U3umbNnv4IaVA0Uj7RYjV3JJ61OCDW5guuA/LhL8nGjlIy0aXTE9WYw9uSpTXmWTtdE6nvdKiqihgomV4Bi0X4Rqrp6xodJnkYo/oE4ogsx6L/Mi3kLefwIEo11LvIiAkgDYtrrvYQB159JUvr216nE3rq7JCYh/89Zysuj/Er3e86kx03cPCQZcdZQoMZOX2ObLP709ykJJnmlLod9dCJ/2IDUU1jHLEjNLgkr4xQQqQ6ptgVLJX7kyFmAbIhUd2PmAiY0TVUmFkRn43Ya6jZokqTTphzORFWWsRXc29n8W5Sw/ZJj67AKUbTlcTOubJj6Nv+8fse9Amx8kLSnWv2gILgIENTK5CIROgMaevdhnIm8shNZEYSfGhUt7dB0o9Ncr55qvTDD1XzGPbf87725YIP6bUcJl5m+ghoNjdPoEnbjvll5TgC6WDkaQsY4UGd4QVU8raasZiuU6JjcZYwvtGFxYjJYsowP0MYthxKyl9/TpxsN+27cBiDCUN2iW1hn6YhsqSgzwPm75asVS6O9JgoNCb5grPHWHwW1ImS30IpsY/rKgfADKN19ACe41IpH8728=----ATTACHMENT:----NDg3NDY0ODU4ODgwMjg0OCAzNTIwNTM3MjcxNTI3MzY3IDc3MjIwNjE5NzI4NTQxMjc=