Inheritances
Files
Overview
FRAMES
NO FRAMES

Class Zend_Amf_Parse_Amf0_Deserializer

Zend_Amf_Parse_Deserializer
|
Zend_Amf_Parse_Amf0_Deserializer
Zend_Amf
|-Zend_Amf_Parse_Amf0
|- class Zend_Amf_Parse_Amf0_Deserializer extends Zend_Amf_Parse_Deserializer
Read an AMF0 input stream and convert it into PHP data types
TodoImplement Typed Object Class Mapping
TodoClass could be implmented as Factory Class with each data type it's own class
PackageZend_Amf
SubpackageParse_Amf0
CopyrightCopyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
Licensehttp://framework.zend.com/license/new-bsd New BSD License

Summary

Instance fields
# $_objectEncoding If AMF3 serialization occurs, update to AMF0 0x03
# $_reference An array of objects used for recursivly deserializing an object
Instance methods
+ getObjectEncoding() Return the object encoding to check if an AMF3 object
+ readAmf3TypeMarker() AMF3 data type encountered load AMF3 Deserializer to handle
+ readArray() Converts numberically indexed actiosncript arrays into php arrays.
+ readDate() Convert AS Date to Zend_Date
+ readMixedArray() Reads an array with numeric and string indexes.
+ readObject() Read AMF objects and convert to PHP objects
+ readReference() Read reference objects
+ readTypeMarker() Read AMF markers and dispatch for deserialization
+ readTypedObject() Read Class that is to be mapped to a server class.
+ readXmlString() Convert XML to SimpleXml

Details

Instance fields

$_objectEncoding
protected $_objectEncoding = Zend_Amf_Constants::AMF0_OBJECT_ENCODING
If AMF3 serialization occurs, update to AMF0 0x03
Var int
$_reference
protected $_reference = array()
An array of objects used for recursivly deserializing an object.
Var array

Instance methods

getObjectEncoding()
public function getObjectEncoding( )
Return the object encoding to check if an AMF3 object
is going to be return.
Returns int
readAmf3TypeMarker()
public function readAmf3TypeMarker( )
AMF3 data type encountered load AMF3 Deserializer to handle
type markers.
Returns string
readArray()
public function readArray( )
Converts numberically indexed actiosncript arrays into php arrays.

Called when marker type is 10
Returns array
readDate()
public function readDate( )
Convert AS Date to Zend_Date
Returns Zend_Date
readMixedArray()
public function readMixedArray( )
Reads an array with numeric and string indexes.

Called when marker type is 8
Returns array
To do 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.
readObject()
public function readObject( $object = null)
Read AMF objects and convert to PHP objects

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.
Parameters
array|null $object
Returns object
readReference()
public function readReference( )
Read reference objects

Used to gain access to the private array of refrence objects.
Called when marker type is 7.
Returns object
Throws Zend_Amf_Exception for invalid reference keys
readTypeMarker()
public function readTypeMarker( $typeMarker = null)
Read AMF markers and dispatch for deserialization

Checks for AMF marker types and calls the appropriate methods
for deserializing those marker types. Markers are the data type of
the following value.
Parameters
integer $typeMarker
Returns mixed whatever the data type is of the marker in php
Throws Zend_Amf_Exception for invalid type
readTypedObject()
public function readTypedObject( )
Read Class that is to be mapped to a server class.

Commonly used for Value Objects on the server
Returns object|array
Throws Zend_Amf_Exception if unable to load type
To do implement Typed Class mapping
readXmlString()
public function readXmlString( )
Convert XML to SimpleXml
If user wants DomDocument they can use dom_import_simplexml
Returns SimpleXml Object