Amf/Parse/Amf0/Deserializer.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Amf
- Subpackage
- Parse_Amf0
- Version
- $Id$
\Zend_Amf_Parse_Amf0_Deserializer
Package: Zend_Amf\Parse_Amf0Read 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.
- Parent(s)
- \Zend_Amf_Parse_Deserializer
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Todo
- Implement Typed Object Class Mapping
- Todo
- Class could be implemented as Factory Class with each data type it's own class
Properties
int $_objectEncoding = \Zend_Amf_Constants::AMF0_OBJECT_ENCODING
If AMF3 serialization occurs, update to AMF0 0x03
Default value\Zend_Amf_Constants::AMF0_OBJECT_ENCODING
Details- Type
- int
array $_reference = array()
An array of objects used for recursively deserializing an object.
Default valuearray()
Details- Type
- array
Methods
readArray() : array
Converts numerically indexed actiosncript arrays into php arrays.
Called when marker type is 10
ReturnsreadMixedArray() : array
Reads an array with numeric and string indexes.
Called when marker type is 8
ReturnsDetails- Todo
- 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(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.
ParametersName | Type | Description |
---|
$object | array | null | |
---|
ReturnsreadTypeMarker(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.
ParametersName | Type | Description |
---|
$typeMarker | integer | |
---|
ReturnsType | Description |
---|
mixed | whatever the data type is of the marker in php |
ThrowsreadTypedObject() : object | array
Read Class that is to be mapped to a server class.
Commonly used for Value Objects on the server
ReturnsType | Description |
---|
object | array | |
ThrowsDetails- Todo
- implement Typed Class mapping