Amf/Parse/Amf0/Serializer.php
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-2011 Zend Technologies USA Inc. (http://www.zend.com)
- license
-
New BSD License
- package
- Zend_Amf
- subpackage
- Parse_Amf0
- version
- $Id: Serializer.php 23775 2011-03-01 17:25:24Z ralph $
\Zend_Amf_Parse_Amf0_Serializer
Serializer PHP misc types back to there corresponding AMF0 Type Marker.
- Extends from
- \Zend_Amf_Parse_Serializer
- copyright
- Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
- license
-
New BSD License
- package
- Zend_Amf
- subpackage
- Parse_Amf0
- uses
-
\Zend_Amf_Parse_Serializer
Properties



string
$_className= ''
Name of the class to be returned



array
$_referenceObjects= 'array'
An array of reference objects
Default valuearray
Details
- Type
- array
Methods



getClassName(
object $object
)
:
false|string
Find if the class name is a class mapped name and return the
respective classname if it is.
Parameters
Name |
Type |
Description |
$object |
object |
|
Returns
Type |
Description |
falsestring |
$className |



writeAmf3TypeMarker(
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
Name |
Type |
Description |
$data |
string |
|
Returns



writeArray(
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
Name |
Type |
Description |
$array |
array |
|
Returns



writeObjectReference(
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
Name |
Type |
Description |
$object |
mixed |
object reference to check for reference |
$markerType |
string |
AMF type of the object to write |
$objectByVal |
mixed |
object to check for reference |
Returns
Type |
Description |
Boolean |
true, if the reference was written, false otherwise |



writeTypeMarker(
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
Name |
Type |
Description |
$data |
mixed |
|
$markerType |
mixed |
|
$dataByVal |
mixed |
|
Returns
Throws



writeTypedObject(
object $data
)
:
\Zend_Amf_Parse_Amf0_Serializer
Write a class mapped object to the output stream.
Parameters
Name |
Type |
Description |
$data |
object |
|
Returns