Amfphp_Core_Amf_Deserializer takes the raw amf input stream and converts it PHP objects representing the data.

package Amfphp_Core_Amf

 Methods

convert from text/binary to php object

deserialize(array $getData, array $postData, string $rawPostData) : \Amfphp_Core_Amf_Packet

Parameters

$getData

array

$postData

array

$rawPostData

string

Returns

read the type byte, then call the corresponding amf3 data reading function

readAmf3Data() : mixed

Returns

mixed

readData is the main switch for mapping a type code to an actual implementation for deciphering it.

readData(mixed $type) : mixed

Parameters

$type

mixed

The $type integer

Returns

mixedThe php version of the data in the Packet block

read amf 3 array

readAmf3Array() : array

Returns

array

read Amf 3 byte array

readAmf3ByteArray() : \Amfphp_Core_Amf_Types_ByteArray

read amf 3 date

readAmf3Date() : boolean | \Amfphp_Core_Amf_Types_Date

Handle decoding of the variable-length representation which gives seven bits of value per serialized byte by using the high-order bit of each byte as a continuation flag.

readAmf3Int() : \read

Returns

\readinteger value

read amf 3 object

readAmf3Object() : \stdClass

Returns

readString

readAmf3String() : string

Returns

string

read amf 3 xml

readAmf3Xml() : \Amfphp_Core_Amf_Types_Xml

read amf 3 xml doc

readAmf3XmlDocument() : \Amfphp_Core_Amf_Types_Xml

readArray turns an all numeric keyed actionscript array into a php array.

readArray() : array

Returns

arrayThe php array

read some data and move pointer

readBuffer(\type $len) : mixed

Parameters

$len

\type

Returns

mixed

readByte grabs the next byte from the data stream and returns it.

readByte() : int

Returns

intThe next byte converted into an integer

readCustomClass reads the amf content associated with a class instance which was registered with Object.registerClass.

readCustomClass() : object

In order to preserve the class name an additional property is assigned to the object Amfphp_Core_Amf_Constants::FIELD_EXPLICIT_TYPE. This property will be overwritten if it existed within the class already.

Returns

objectThe php representation of the object

readDate reads a date from the amf Packet and returns the time in ms.

readDate() : \Amfphp_Core_Amf_Types_Date

This method is still under development.

Returns

\Amfphp_Core_Amf_Types_Datea container with the date in ms.

readDouble reads the floating point value from the bytes stream and properly orders the bytes depending on the system architecture.

readDouble() : float

Returns

floatThe floating point value of the next 8 bytes

readHeaders converts that header section of the amf Packet into php obects.

readHeaders() 

Header information typically contains meta data about the Packet.

readInt grabs the next 2 bytes and returns the next two bytes, shifted and combined to produce the resulting integer

readInt() : int

Returns

intThe resulting integer from the next 2 bytes

readLong grabs the next 4 bytes shifts and combines them to produce an integer

readLong() : int

Returns

intThe resulting integer from the next 4 bytes

readLongUTF first grabs the next 4 bytes which represent the string length.

readLongUTF() : string

Then it grabs the next (len) bytes of the resulting in the string

Returns

stringThe utf8 decoded string

read messages in AMF packet

readMessages() 

readMixedArray turns an array with numeric and string indexes into a php array

readMixedArray() : array

Returns

arrayThe php array with mixed indexes

readMixedObject reads the name/value properties of the amf Packet and converts numeric looking keys to numeric keys

readMixedObject() : array

Returns

arrayThe php array with the object data

readObject reads the name/value properties of the amf Packet and converts them into their equivilent php representation

readObject() : Object

Returns

ObjectThe php object filled with the data

readReference replaces the old readFlushedSO.

readReference() : String

It treats where there are references to other objects. Currently it does not resolve the object as this would involve a serious amount of overhead, unless you have a genius idea

Returns

String

readUTF first grabs the next 2 bytes which represent the string length.

readUTF() : string

Then it grabs the next (len) bytes of the resulting string.

Returns

stringThe utf8 decoded string

reset reference stores

resetReferences() 

 Properties

 

$amf0storedObjects : array
 

$currentByte : int
access protected
 

$deserializedPacket : \<Amfphp_Core_Amf_Packet>
 

$headersLeftToProcess : int
access protected
 

$messagesLeftToProcess : int
access protected
 

$rawData : string
 

$storedDefinitions : array
 

$storedObjects : array
 

$storedStrings : array