/** * 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 AMFParser\InputStream($value); $deserializer = new AMFParser\Amf3\Deserializer($stream); return $deserializer->readTypeMarker(); } catch (\Exception $e) { throw new SerializationException('Unserialization failed by previous error', 0, $e); } }
/** * AMF3 data type encountered load AMF3 Deserializer to handle * type markers. * * @return string */ public function readAmf3TypeMarker() { $deserializer = new Amf\Parser\Amf3\Deserializer($this->_stream); $this->_objectEncoding = Amf\Constants::AMF3_OBJECT_ENCODING; return $deserializer->readTypeMarker(); }