Amf/Parse/Amf3/Serializer.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 [email protected] 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_Amf3  
Version
$Id: Serializer.php 25179 2012-12-22 21:29:30Z rob $  

\Zend_Amf_Parse_Amf3_Serializer

Package: Zend\Amf\Parse\Amf3

Detect PHP object type and convert it to a corresponding AMF3 object type

Parent(s)
\Zend_Amf_Parse_Serializer
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotectedarray $_referenceDefinitions = array()

An array of reference class definitions, indexed by classname

Default valuearray()Details
Type
array
Propertyprotectedarray $_referenceObjects = array()

An array of reference objects per amf body

Default valuearray()Details
Type
array
Propertyprotectedarray $_referenceStrings = array()

An array of reference strings per amf body

Default valuearray()Details
Type
array
Propertyprotectedstring $_strEmpty = ''

A constant empty string

Default value''Details
Type
string
Propertyprotectedstring $_stream =
inherited

Reference to the current output stream being constructed

Inherited from: \Zend_Amf_Parse_Serializer::$$_stream
Details
Type
string
Inherited_from
\Zend_Amf_Parse_Serializer::$$_stream  
Propertyprotectedbool $mbStringFunctionsOverloaded =
inherited

str* functions overloaded using mbstring.func_overload

Inherited from: \Zend_Amf_Parse_Serializer::$$mbStringFunctionsOverloaded
Details
Type
bool
Inherited_from
\Zend_Amf_Parse_Serializer::$$mbStringFunctionsOverloaded  

Methods

methodpublic__construct(\Zend_Amf_Parse_OutputStream $stream) : void
inherited

Constructor

Inherited from: \Zend_Amf_Parse_Serializer::__construct()
Parameters
Name Type Description
$stream \Zend_Amf_Parse_OutputStream
methodpublicwriteArray(array $array) : \Zend_Amf_Parse_Amf3_Serializer

Write a PHP array back to the amf output stream

Parameters
Name Type Description
$array array
Returns
Type Description
\Zend_Amf_Parse_Amf3_Serializer
methodprotectedwriteBinaryString(string $string) : \Zend_Amf_Parse_Amf3_Serializer

Send string to output stream, without trying to reference it.

The string is prepended with strlen($string) << 1 | 0x01

Parameters
Name Type Description
$string string
Returns
Type Description
\Zend_Amf_Parse_Amf3_Serializer
methodpublicwriteByteArray(string | \Zend_Amf_Value_ByteArray $data) : \Zend_Amf_Parse_Amf3_Serializer

Send ByteArray to output stream

Parameters
Name Type Description
$data string | \Zend_Amf_Value_ByteArray
Returns
Type Description
\Zend_Amf_Parse_Amf3_Serializer
methodpublicwriteDate(\DateTime | \Zend_Date $date) : \Zend_Amf_Parse_Amf3_Serializer

Convert DateTime/Zend_Date to AMF date

Parameters
Name Type Description
$date \DateTime | \Zend_Date
Returns
Type Description
\Zend_Amf_Parse_Amf3_Serializer
methodpublicwriteInteger( $int) : \Zend_Amf_Parse_Amf3_Serializer

Write an AMF3 integer

Parameters
Name Type Description
$int
Returns
Type Description
\Zend_Amf_Parse_Amf3_Serializer
methodpublicwriteObject( $object) : \Zend_Amf_Parse_Amf3_Serializer

Write object to ouput stream

Parameters
Name Type Description
$object
Returns
Type Description
\Zend_Amf_Parse_Amf3_Serializer
methodprotectedwriteObjectReference(mixed $object, 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
Name Type Description
$object mixed

object reference to check for reference

$objectByVal mixed

object to check for reference

Returns
Type Description
Boolean true, if the reference was written, false otherwise
methodpublicwriteString(string $string) : \Zend_Amf_Parse_Amf3_Serializer

Send string to output stream

Parameters
Name Type Description
$string string
Returns
Type Description
\Zend_Amf_Parse_Amf3_Serializer
methodpublicwriteTypeMarker(mixed $data, int $markerType = null, mixed $dataByVal = false) : void

Serialize PHP types to AMF3 and write to stream

Checks to see if the type was declared and then either auto negotiates the type or use the user defined markerType to serialize the data from php back to AMF3

Parameters
Name Type Description
$data mixed
$markerType int
$dataByVal mixed
methodpublicwriteXml(\DOMDocument | \SimpleXMLElement $xml) : \Zend_Amf_Parse_Amf3_Serializer

Send xml to output stream

Parameters
Name Type Description
$xml \DOMDocument | \SimpleXMLElement
Returns
Type Description
\Zend_Amf_Parse_Amf3_Serializer
Documentation was generated by phpDocumentor 2.0.0a8.