writeTypeMarker($value); return $stream->getStream(); } catch (Exception $e) { #require_once 'Zend/Serializer/Exception.php'; throw new Zend_Serializer_Exception('Serialization failed by previous error', 0, $e); } } /** * Deserialize an AMF3 value to PHP * * @param mixed $value * @param array $opts * @return string * @throws Zend_Serializer_Exception */ public function unserialize($value, array $opts = array()) { try { $stream = new Zend_Amf_Parse_InputStream($value); $deserializer = new Zend_Amf_Parse_Amf3_Deserializer($stream); return $deserializer->readTypeMarker(); } catch (Exception $e) { #require_once 'Zend/Serializer/Exception.php'; throw new Zend_Serializer_Exception('Unserialization failed by previous error', 0, $e); } } }