Amf/Parse/Amf0/Deserializer.php

Show: PublicProtectedPrivateinherited
Table of Contents
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_Amf0
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.
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

>VPropertyprotectedint $_objectEncoding = \Zend_Amf_Constants::AMF0_OBJECT_ENCODING
If AMF3 serialization occurs, update to AMF0 0x03
Default value\Zend_Amf_Constants::AMF0_OBJECT_ENCODINGDetails
Type
int
>VPropertyprotectedarray $_reference = array()
An array of objects used for recursively deserializing an object.
Default valuearray()Details
Type
array

Methods

methodpublicgetObjectEncoding() : int

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

Returns
TypeDescription
int
methodpublicreadAmf3TypeMarker() : string

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

Returns
TypeDescription
string
methodpublicreadArray() : array

Converts numerically indexed actiosncript arrays into php arrays.

Called when marker type is 10
Returns
TypeDescription
array
methodpublicreadDate() : \Zend_Date

Convert AS Date to Zend_Date

Returns
TypeDescription
\Zend_Date
methodpublicreadMixedArray() : array

Reads an array with numeric and string indexes.

Called when marker type is 8
Returns
TypeDescription
array
Details
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.  
methodpublicreadObject(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
NameTypeDescription
$objectarray | null
Returns
TypeDescription
object
methodpublicreadReference() : object

Read reference objects

Used to gain access to the private array of reference objects. Called when marker type is 7.
Returns
TypeDescription
object
Throws
ExceptionDescription
\Zend_Amf_Exceptionfor invalid reference keys
methodpublicreadTypeMarker(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
NameTypeDescription
$typeMarkerinteger
Returns
TypeDescription
mixedwhatever the data type is of the marker in php
Throws
ExceptionDescription
\Zend_Amf_Exceptionfor invalid type
methodpublicreadTypedObject() : object | array

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

Commonly used for Value Objects on the server
Returns
TypeDescription
object | array
Throws
ExceptionDescription
\Zend_Amf_Exceptionif unable to load type
Details
Todo
implement Typed Class mapping  
methodpublicreadXmlString() : \SimpleXml

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

Returns
TypeDescription
\SimpleXmlObject
Documentation was generated by phpDocumentor 2.2.0 .