PHP 클래스 Amfphp_Core_Amf_Deserializer, amfphp-2.0

파일 보기 프로젝트 열기: silexlabs/amfphp-2.0 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$voConverter Amfphp_Core_Common_IVoConverter converts VOs directly if set, rather than instanciating anonymous classes that are converted later

보호된 프로퍼티들

프로퍼티 타입 설명
$amf0storedObjects array objects stored for tracking references(amf0)
$currentByte integer The current seek cursor of the stream note: must be initialised here to avoid error 'String offset cast occured'
$deserializedPacket the Packet contained in the serialized data
$headersLeftToProcess integer The number of headers in the packet left to process
$messagesLeftToProcess integer The number of Messages in the packet left to process
$rawData string data to deserialize
$storedDefinitions array class definitions(traits) stored for tracking references(amf3)
$storedObjects array objects stored for tracking references(amf3)
$storedStrings array strings stored for tracking references(amf3)

공개 메소드들

메소드 설명
deserialize ( array $getData, array $postData, string $rawPostData ) : Amfphp_Core_Amf_Packet convert from text/binary to php object
readAmf3Data ( ) : mixed read the type byte, then call the corresponding amf3 data reading function
readData ( mixed $type ) : mixed readData is the main switch for mapping a type code to an actual implementation for deciphering it.

보호된 메소드들

메소드 설명
readAmf3Array ( ) : array read amf 3 array
readAmf3ByteArray ( ) : Amfphp_Core_Amf_Types_ByteArray read Amf 3 byte array
readAmf3Date ( ) : boolean | Amfphp_Core_Amf_Types_Date read amf 3 date
readAmf3Int ( ) : read 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.
readAmf3Object ( ) : mixed read amf 3 object
readAmf3String ( ) : string readString
readAmf3Vector ( $type ) : array Reads a vector array of objects from the AMF stream. This works for all vector arrays: vector-object, vector-int vector-uint and vector-double. The Vector is cast to a PHP array. Please note that because of the way php handles integers, uints have to be cast as floats. See {@link http://php.net/manual/en/language.types.integer.php}
readAmf3VectorValue ( $length, $format ) : Read numeric values from the AMF byte stream. Please be aware that unsigned integers are not really supported in PHP, and for this reason unsigned integers are cast to float. {@link http://php.net/manual/en/language.types.integer.php}.
readAmf3Xml ( ) : Amfphp_Core_Amf_Types_Xml read amf 3 xml
readAmf3XmlDocument ( ) : Amfphp_Core_Amf_Types_Xml read amf 3 xml doc
readArray ( ) : array readArray turns an all numeric keyed actionscript array into a php array.
readBuffer ( type $len ) : mixed read some data and move pointer
readByte ( ) : integer readByte grabs the next byte from the data stream and returns it.
readCustomClass ( ) : object readCustomClass reads the amf content associated with a class instance which was registered with Object.registerClass.
readDate ( ) : Amfphp_Core_Amf_Types_Date readDate reads a date from the amf Packet and returns the time in ms.
readDouble ( ) : float readDouble reads the floating point value from the bytes stream and properly orders the bytes depending on the system architecture.
readHeaders ( ) readHeaders converts that header section of the amf Packet into php obects.
readInt ( ) : integer readInt grabs the next 2 bytes and returns the next two bytes, shifted and combined to produce the resulting integer
readLong ( ) : integer readLong grabs the next 4 bytes shifts and combines them to produce an integer
readLongUTF ( ) : string readLongUTF first grabs the next 4 bytes which represent the string length.
readMessages ( ) read messages in AMF packet
readMixedArray ( ) : array readMixedArray turns an array with numeric and string indexes into a php array
readMixedObject ( ) : array readMixedObject reads the name/value properties of the amf Packet and converts numeric looking keys to numeric keys
readObject ( ) : Object readObject reads the name/value properties of the amf Packet and converts them into their equivilent php representation
readReference ( ) : String readReference replaces the old readFlushedSO. 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
readUTF ( ) : string readUTF first grabs the next 2 bytes which represent the string length.
readXml ( ) : Amfphp_Core_Amf_Types_Xml read xml
resetReferences ( ) reset reference stores
resolveType ( type $typeIdentifier ) : stdClass tries to use the type to get a typed object. If not possible, return a stdClass, with the explicit type marker set if the type was not just an empty string

메소드 상세

deserialize() 공개 메소드

convert from text/binary to php object
public deserialize ( array $getData, array $postData, string $rawPostData ) : Amfphp_Core_Amf_Packet
$getData array
$postData array
$rawPostData string
리턴 Amfphp_Core_Amf_Packet

readAmf3Array() 보호된 메소드

read amf 3 array
protected readAmf3Array ( ) : array
리턴 array

readAmf3ByteArray() 보호된 메소드

read Amf 3 byte array
protected readAmf3ByteArray ( ) : Amfphp_Core_Amf_Types_ByteArray
리턴 Amfphp_Core_Amf_Types_ByteArray

readAmf3Data() 공개 메소드

read the type byte, then call the corresponding amf3 data reading function
public readAmf3Data ( ) : mixed
리턴 mixed

readAmf3Date() 보호된 메소드

read amf 3 date
protected readAmf3Date ( ) : boolean | Amfphp_Core_Amf_Types_Date
리턴 boolean | Amfphp_Core_Amf_Types_Date

readAmf3Int() 보호된 메소드

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.
protected readAmf3Int ( ) : read
리턴 read integer value

readAmf3Object() 보호된 메소드

read amf 3 object
protected readAmf3Object ( ) : mixed
리턴 mixed stdClass, or VoClass if VoConverter could find it.

readAmf3String() 보호된 메소드

readString
protected readAmf3String ( ) : string
리턴 string

readAmf3Vector() 보호된 메소드

Reads a vector array of objects from the AMF stream. This works for all vector arrays: vector-object, vector-int vector-uint and vector-double. The Vector is cast to a PHP array. Please note that because of the way php handles integers, uints have to be cast as floats. See {@link http://php.net/manual/en/language.types.integer.php}
protected readAmf3Vector ( $type ) : array
리턴 array The objects in the vector in a native PHP array.

readAmf3VectorValue() 보호된 메소드

Read numeric values from the AMF byte stream. Please be aware that unsigned integers are not really supported in PHP, and for this reason unsigned integers are cast to float. {@link http://php.net/manual/en/language.types.integer.php}.
protected readAmf3VectorValue ( $length, $format ) :
리턴

readAmf3Xml() 보호된 메소드

read amf 3 xml
protected readAmf3Xml ( ) : Amfphp_Core_Amf_Types_Xml
리턴 Amfphp_Core_Amf_Types_Xml

readAmf3XmlDocument() 보호된 메소드

read amf 3 xml doc
protected readAmf3XmlDocument ( ) : Amfphp_Core_Amf_Types_Xml
리턴 Amfphp_Core_Amf_Types_Xml

readArray() 보호된 메소드

readArray turns an all numeric keyed actionscript array into a php array.
protected readArray ( ) : array
리턴 array The php array

readBuffer() 보호된 메소드

read some data and move pointer
protected readBuffer ( type $len ) : mixed
$len type
리턴 mixed

readByte() 보호된 메소드

readByte grabs the next byte from the data stream and returns it.
protected readByte ( ) : integer
리턴 integer The next byte converted into an integer

readCustomClass() 보호된 메소드

If a VoConverter is available, it is used to instanciate the Vo. If not, 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.
protected readCustomClass ( ) : object
리턴 object The php representation of the object

readData() 공개 메소드

readData is the main switch for mapping a type code to an actual implementation for deciphering it.
public readData ( mixed $type ) : mixed
$type mixed The $type integer
리턴 mixed The php version of the data in the Packet block

readDate() 보호된 메소드

This method is still under development.
protected readDate ( ) : Amfphp_Core_Amf_Types_Date
리턴 Amfphp_Core_Amf_Types_Date a container with the date in ms.

readDouble() 보호된 메소드

readDouble reads the floating point value from the bytes stream and properly orders the bytes depending on the system architecture.
protected readDouble ( ) : float
리턴 float The floating point value of the next 8 bytes

readHeaders() 보호된 메소드

Header information typically contains meta data about the Packet.
protected readHeaders ( )

readInt() 보호된 메소드

readInt grabs the next 2 bytes and returns the next two bytes, shifted and combined to produce the resulting integer
protected readInt ( ) : integer
리턴 integer The resulting integer from the next 2 bytes

readLong() 보호된 메소드

readLong grabs the next 4 bytes shifts and combines them to produce an integer
protected readLong ( ) : integer
리턴 integer The resulting integer from the next 4 bytes

readLongUTF() 보호된 메소드

Then it grabs the next (len) bytes of the resulting in the string
protected readLongUTF ( ) : string
리턴 string The utf8 decoded string

readMessages() 보호된 메소드

read messages in AMF packet
protected readMessages ( )

readMixedArray() 보호된 메소드

readMixedArray turns an array with numeric and string indexes into a php array
protected readMixedArray ( ) : array
리턴 array The php array with mixed indexes

readMixedObject() 보호된 메소드

readMixedObject reads the name/value properties of the amf Packet and converts numeric looking keys to numeric keys
protected readMixedObject ( ) : array
리턴 array The php array with the object data

readObject() 보호된 메소드

readObject reads the name/value properties of the amf Packet and converts them into their equivilent php representation
protected readObject ( ) : Object
리턴 Object The php object filled with the data

readReference() 보호된 메소드

readReference replaces the old readFlushedSO. 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
protected readReference ( ) : String
리턴 String

readUTF() 보호된 메소드

Then it grabs the next (len) bytes of the resulting string.
protected readUTF ( ) : string
리턴 string The utf8 decoded string

readXml() 보호된 메소드

read xml
protected readXml ( ) : Amfphp_Core_Amf_Types_Xml
리턴 Amfphp_Core_Amf_Types_Xml

resetReferences() 보호된 메소드

reset reference stores
protected resetReferences ( )

resolveType() 보호된 메소드

tries to use the type to get a typed object. If not possible, return a stdClass, with the explicit type marker set if the type was not just an empty string
protected resolveType ( type $typeIdentifier ) : stdClass
$typeIdentifier type
리턴 stdClass or typed object

프로퍼티 상세

$amf0storedObjects 보호되어 있는 프로퍼티

objects stored for tracking references(amf0)
protected array $amf0storedObjects
리턴 array

$currentByte 보호되어 있는 프로퍼티

The current seek cursor of the stream note: must be initialised here to avoid error 'String offset cast occured'
protected int $currentByte
리턴 integer

$deserializedPacket 보호되어 있는 프로퍼티

the Packet contained in the serialized data
protected $deserializedPacket
리턴

$headersLeftToProcess 보호되어 있는 프로퍼티

The number of headers in the packet left to process
protected int $headersLeftToProcess
리턴 integer

$messagesLeftToProcess 보호되어 있는 프로퍼티

The number of Messages in the packet left to process
protected int $messagesLeftToProcess
리턴 integer

$rawData 보호되어 있는 프로퍼티

data to deserialize
protected string $rawData
리턴 string

$storedDefinitions 보호되어 있는 프로퍼티

class definitions(traits) stored for tracking references(amf3)
protected array $storedDefinitions
리턴 array

$storedObjects 보호되어 있는 프로퍼티

objects stored for tracking references(amf3)
protected array $storedObjects
리턴 array

$storedStrings 보호되어 있는 프로퍼티

strings stored for tracking references(amf3)
protected array $storedStrings
리턴 array

$voConverter 공개적으로 프로퍼티

converts VOs directly if set, rather than instanciating anonymous classes that are converted later
public Amfphp_Core_Common_IVoConverter $voConverter
리턴 Amfphp_Core_Common_IVoConverter