API Documentation

Zend/Amf/Parse/Amf0/Deserializer.php

Show: inherited
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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Amf  
Subpackage
Parse_Amf0  
Version
$Id: Deserializer.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Amf_Parse_Amf0_Deserializer

Package: Zend\Amf\Parse\Amf0

Read an AMF0 input stream and convert it into PHP data types

Parent(s)
\Zend_Amf_Parse_Deserializer
Copyright
Copyright (c) 2005-2012 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

Propertyprotectedint  $_objectEncoding= 'Zend_Amf_Constants::AMF0_OBJECT_ENCODING'

If AMF3 serialization occurs, update to AMF0 0x03

Default valueZend_Amf_Constants::AMF0_OBJECT_ENCODINGDetails
Type
int
Propertyprotectedarray  $_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
Type Description
int
methodpublicreadAmf3TypeMarker( ) : string

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

Returns
Type Description
string
methodpublicreadArray( ) : array

Converts numerically indexed actiosncript arrays into php arrays.

Called when marker type is 10

Returns
Type Description
array
methodpublicreadDate( ) : \Zend_Date

Convert AS Date to Zend_Date

Returns
Type Description
\Zend_Date
methodpublicreadMixedArray( ) : array

Reads an array with numeric and string indexes.

Called when marker type is 8

Returns
Type Description
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
Name Type Description
$object array|null
Returns
Type Description
object
methodpublicreadReference( ) : object

Read reference objects

Used to gain access to the private array of reference objects. Called when marker type is 7.

Returns
Type Description
object
Throws
Exception Description
\Zend_Amf_Exception for 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
Name Type Description
$typeMarker integer
Returns
Type Description
mixed whatever the data type is of the marker in php
Throws
Exception Description
\Zend_Amf_Exception for 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
Type Description
object|array
Throws
Exception Description
\Zend_Amf_Exception if 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
Type Description
\SimpleXml Object
Documentation was generated by DocBlox 0.15.1.