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

`\Amfphp_Core_Amf_Packet`

## 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

`mixed`The 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

### Returns

`\Amfphp_Core_Amf_Types_ByteArray`

## read amf 3 date

    readAmf3Date() : boolean | \Amfphp_Core_Amf_Types_Date

### Exceptions

`\Amfphp_Core_Exception` |

### Returns

`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

`\read`integer value

## read amf 3 object

    readAmf3Object() : \stdClass

### Returns

`\stdClass`

## readString

    readAmf3String() : string

### Returns

`string`

## read amf 3 xml

    readAmf3Xml() : \Amfphp_Core_Amf_Types_Xml

### Returns

`\Amfphp_Core_Amf_Types_Xml`

## read amf 3 xml doc

    readAmf3XmlDocument() : \Amfphp_Core_Amf_Types_Xml

### Returns

`\Amfphp_Core_Amf_Types_Xml`

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

    readArray() : array

### Returns

`array`The 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

`int`The 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

`object`The 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_Date`a 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

`float`The 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

`int`The resulting integer from the next 2 bytes

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

    readLong() : int

### Returns

`int`The 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

`string`The 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

`array`The 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

`array`The 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

`Object`The 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

`string`The utf8 decoded string

## read xml

    readXml() : \Amfphp_Core_Amf_Types_Xml

### Returns

`\Amfphp_Core_Amf_Types_Xml`

## 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