Amf/Parse/Amf0/Serializer.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 [email protected] 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_Serializer

Package: Zend_Amf\Parse_Amf0
Serializer PHP misc types back to there corresponding AMF0 Type Marker.
Parent(s)
\Zend_Amf_Parse_Serializer
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Uses
 

Properties

>VPropertyprotectedstring $_className = ''

Name of the class to be returned

Default value''Details
Type
string
>VPropertyprotectedarray $_referenceObjects = array()
An array of reference objects
Default valuearray()Details
Type
array

Methods

methodprotectedgetClassName(object $object) : false | string

Find if the class name is a class mapped name and return the respective classname if it is.

Parameters
NameTypeDescription
$objectobject
Returns
TypeDescription
false | string$className
methodpublicwriteAmf3TypeMarker(string $data) : \Zend_Amf_Parse_Amf0_Serializer

Encountered and AMF3 Type Marker use AMF3 serializer. Once AMF3 is encountered it will not return to AMf0.

Parameters
NameTypeDescription
$datastring
Returns
TypeDescription
\Zend_Amf_Parse_Amf0_Serializer
methodpublicwriteArray(array $array) : \Zend_Amf_Parse_Amf0_Serializer

Write a standard numeric array to the output stream. If a mixed array is encountered call writeTypeMarker with mixed array.

Parameters
NameTypeDescription
$arrayarray
Returns
TypeDescription
\Zend_Amf_Parse_Amf0_Serializer
methodpublicwriteDate(\DateTime | \Zend_Date $data) : \Zend_Amf_Parse_Amf0_Serializer

Convert the DateTime into an AMF Date

Parameters
NameTypeDescription
$data\DateTime | \Zend_Date
Returns
TypeDescription
\Zend_Amf_Parse_Amf0_Serializer
methodpublicwriteObject( $object) : \Zend_Amf_Parse_Amf0_Serializer

Write a PHP array with string or mixed keys.

Parameters
NameTypeDescription
$object
Returns
TypeDescription
\Zend_Amf_Parse_Amf0_Serializer
methodprotectedwriteObjectReference(mixed $object, string $markerType, mixed $objectByVal = false) : Boolean

Check if the given object is in the reference table, write the reference if it exists, otherwise add the object to the reference table

Parameters
NameTypeDescription
$objectmixed

object reference to check for reference

$markerTypestring

AMF type of the object to write

$objectByValmixed

object to check for reference

Returns
TypeDescription
Booleantrue, if the reference was written, false otherwise
methodpublicwriteTypeMarker(mixed $data, mixed $markerType = null, mixed $dataByVal = false) : \Zend_Amf_Parse_Amf0_Serializer

Determine type and serialize accordingly

Checks to see if the type was declared and then either auto negotiates the type or relies on the user defined markerType to serialize the data into amf
Parameters
NameTypeDescription
$datamixed
$markerTypemixed
$dataByValmixed
Returns
TypeDescription
\Zend_Amf_Parse_Amf0_Serializer
Throws
ExceptionDescription
\Zend_Amf_Exceptionfor unrecognized types or data
methodpublicwriteTypedObject(object $data) : \Zend_Amf_Parse_Amf0_Serializer

Write a class mapped object to the output stream.

Parameters
NameTypeDescription
$dataobject
Returns
TypeDescription
\Zend_Amf_Parse_Amf0_Serializer
Documentation was generated by phpDocumentor 2.2.0 .