Read an AMF0 input stream and convert it into PHP data types
Logic for deserialization of the AMF envelop is based on resources supplied by Adobe Blaze DS. For and example of deserialization please review the BlazeDS source tree.
todo | Implement Typed Object Class Mapping |
---|---|
todo | Class could be implemented as Factory Class with each data type it's own class |
package | Zend_Amf |
subpackage | Parse_Amf0 |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_Amf_Parse_Deserializer |
__construct(\Zend_Amf_Parse_InputStream $stream) : void
\Zend_Amf_Parse_InputStream
getObjectEncoding() : integer
integer
readAmf3TypeMarker() : string
string
readArray() : array
Called when marker type is 10
array
readDate() : \Zend_Date
\Zend_Date
readMixedArray() : array
Called when marker type is 8
todo | As of Flash Player 9 there is not support for mixed typed arrays so we handle this as an object. With the introduction of vectors in Flash Player 10 this may need to be reconsidered. |
---|
array
readObject(array|null $object = null
) : object
Read the name value pair objects form the php message and convert them to a php object class.
Called when the marker type is 3.
array
null
object
readReference() : object
Used to gain access to the private array of reference objects. Called when marker type is 7.
\Zend_Amf_Exception |
for invalid reference keys |
---|
object
readTypeMarker(integer $typeMarker = null
) : mixed
Checks for AMF marker types and calls the appropriate methods for deserializing those marker types. Markers are the data type of the following value.
inherited_from | \Zend_Amf_Parse_Deserializer::readTypeMarker() |
---|
integer
\Zend_Amf_Exception |
for invalid type |
---|
mixed
whatever the data type is of the marker in phpreadTypeMarker($markerType = null
) : mixed
mixed
Whatever the data type is of the marker in phpreadTypedObject() : object | array
Commonly used for Value Objects on the server
todo | implement Typed Class mapping |
---|
\Zend_Amf_Exception |
if unable to load type |
---|
object
array
readXmlString() : \SimpleXml
\SimpleXml
Object$_objectEncoding : integer
\Zend_Amf_Constants::AMF0_OBJECT_ENCODING
$_reference : array
array()
$_stream : \Zend_Amf_Parse_InputStream