API Documentation

Amf/Parse/Amf0/Deserializer.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Amf
subpackage
Parse_Amf0
version
$Id: Deserializer.php 21210 2010-02-27 10:37:39Z yoshida@zend.co.jp $
Classes
Zend_Amf_Parse_Amf0_Deserializer

Description

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.

Zend_Amf_Parse_Amf0_Deserializer

Extends from
Zend_Amf_Parse_Deserializer
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Amf
subpackage
Parse_Amf0
todo
Implement Typed Object Class Mapping
todo
Class could be implemented as Factory Class with each data type it's own class
Properties
$_reference
$_objectEncoding
Methods
readTypeMarker
readObject
readReference
readMixedArray
readArray
readDate
readXmlString
readTypedObject
readAmf3TypeMarker
getObjectEncoding

Description

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

Properties

$_objectEncoding

int $_objectEncoding = 'Zend_Amf_Constants'

If AMF3 serialization occurs, update to AMF0 0x03

Details

$_objectEncoding
int
visibility
protected
default
Zend_Amf_Constants
final
false
static
false

$_reference

array $_reference = 'array'

An array of objects used for recursively deserializing an object.

Details

$_reference
array
visibility
protected
default
array
final
false
static
false

Methods

getObjectEncoding

getObjectEncoding( ) : int

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

Output
int
Details
visibility
public
final
false
static
false

readAmf3TypeMarker

readAmf3TypeMarker( ) : string

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

Output
string
Details
visibility
public
final
false
static
false

readArray

readArray( ) : array

Converts numerically indexed actiosncript arrays into php arrays.

Called when marker type is 10

Output
array
Details
visibility
public
final
false
static
false

readDate

readDate( ) : Zend_Date

Convert AS Date to Zend_Date

Output
Zend_Date
Details
visibility
public
final
false
static
false

readMixedArray

readMixedArray( ) : array

Reads an array with numeric and string indexes.

Called when marker type is 8

Output
array
Details
visibility
public
final
false
static
false
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

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.

Arguments
$object
arraynull
Output
object
Details
visibility
public
final
false
static
false

readReference

readReference( ) : object

Read reference objects

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

Output
object
Details
visibility
public
final
false
static
false
throws
for invalid reference keys

readTypeMarker

readTypeMarker( 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.

Arguments
$typeMarker
integer
Output
mixed
whatever the data type is of the marker in php
Details
visibility
public
final
false
static
false
throws
for invalid type

readTypedObject

readTypedObject( ) : object|array

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

Commonly used for Value Objects on the server

Output
object|array
Details
visibility
public
final
false
static
false
throws
if unable to load type
todo
implement Typed Class mapping

readXmlString

readXmlString( ) : SimpleXml

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

Output
SimpleXml
Object
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.