\Zend_Amf_Parse_Amf0_Deserializer

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.

Summary

Methods
Properties
Constants
__construct()
readTypeMarker()
readObject()
readReference()
readMixedArray()
readArray()
readDate()
readXmlString()
readTypedObject()
readAmf3TypeMarker()
getObjectEncoding()
No public properties found
No constants found
No protected methods found
$_stream
$_reference
$_objectEncoding
N/A
No private methods found
No private properties found
N/A

Properties

$_reference

$_reference : array

An array of objects used for recursivly deserializing an object.

Type

array

$_objectEncoding

$_objectEncoding : integer

If AMF3 serialization occurs, update to AMF0 0x03

Type

integer

Methods

readTypeMarker()

readTypeMarker(integer  $typeMarker = null) : mixed

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

Throws

\Zend_Amf_Exception

for invalid type

Returns

mixed —

whatever the data type is of the marker in php

readObject()

readObject(array|null  $object = null) : object

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()

readReference() : object

Read reference objects

Used to gain access to the private array of refrence objects. Called when marker type is 7.

Throws

\Zend_Amf_Exception

for invalid reference keys

Returns

object

readMixedArray()

readMixedArray() : array

Reads an array with numeric and string indexes.

Called when marker type is 8

Returns

array

readArray()

readArray() : array

Converts numberically indexed actiosncript arrays into php arrays.

Called when marker type is 10

Returns

array

readDate()

readDate() : \Zend_Date

Convert AS Date to Zend_Date

Returns

\Zend_Date

readXmlString()

readXmlString() : \SimpleXml

Convert XML to SimpleXml If user wants DomDocument they can use dom_import_simplexml

Returns

\SimpleXml —

Object

readTypedObject()

readTypedObject() : object|array

Read Class that is to be mapped to a server class.

Commonly used for Value Objects on the server

Throws

\Zend_Amf_Exception

if unable to load type

Returns

object|array

readAmf3TypeMarker()

readAmf3TypeMarker() : string

AMF3 data type encountered load AMF3 Deserializer to handle type markers.

Returns

string

getObjectEncoding()

getObjectEncoding() : integer

Return the object encoding to check if an AMF3 object is going to be return.

Returns

integer