import v1.1.0_beta1 | 2009-08-21
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
* @category Zend
|
||||
* @package Zend_Amf
|
||||
* @subpackage Parse_Amf0
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
|
||||
@ -29,7 +29,7 @@ require_once 'Zend/Amf/Parse/Deserializer.php';
|
||||
* @todo Class could be implmented as Factory Class with each data type it's own class
|
||||
* @package Zend_Amf
|
||||
* @subpackage Parse_Amf0
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Amf_Parse_Amf0_Deserializer extends Zend_Amf_Parse_Deserializer
|
||||
@ -47,13 +47,6 @@ class Zend_Amf_Parse_Amf0_Deserializer extends Zend_Amf_Parse_Deserializer
|
||||
*/
|
||||
protected $_objectEncoding = Zend_Amf_Constants::AMF0_OBJECT_ENCODING;
|
||||
|
||||
/**
|
||||
* refrence to AMF3 deserializer
|
||||
*
|
||||
* @var Zend_Amf_Parse_Amf3_Deserializer
|
||||
*/
|
||||
protected $_deserializer = null;
|
||||
|
||||
/**
|
||||
* Read AMF markers and dispatch for deserialization
|
||||
*
|
||||
@ -68,7 +61,7 @@ class Zend_Amf_Parse_Amf0_Deserializer extends Zend_Amf_Parse_Deserializer
|
||||
*/
|
||||
public function readTypeMarker($typeMarker = null)
|
||||
{
|
||||
if (is_null($typeMarker)) {
|
||||
if ($typeMarker === null) {
|
||||
$typeMarker = $this->_stream->readByte();
|
||||
}
|
||||
|
||||
@ -152,7 +145,7 @@ class Zend_Amf_Parse_Amf0_Deserializer extends Zend_Amf_Parse_Deserializer
|
||||
*/
|
||||
public function readObject($object = null)
|
||||
{
|
||||
if (is_null($object)) {
|
||||
if ($object === null) {
|
||||
$object = array();
|
||||
}
|
||||
|
||||
@ -261,7 +254,7 @@ class Zend_Amf_Parse_Amf0_Deserializer extends Zend_Amf_Parse_Deserializer
|
||||
* Commonly used for Value Objects on the server
|
||||
*
|
||||
* @todo implement Typed Class mapping
|
||||
* @return object
|
||||
* @return object|array
|
||||
* @throws Zend_Amf_Exception if unable to load type
|
||||
*/
|
||||
public function readTypedObject()
|
||||
@ -277,7 +270,9 @@ class Zend_Amf_Parse_Amf0_Deserializer extends Zend_Amf_Parse_Deserializer
|
||||
$returnObject->$key = $value;
|
||||
}
|
||||
}
|
||||
|
||||
if($returnObject instanceof Zend_Amf_Value_Messaging_ArrayCollection) {
|
||||
$returnObject = get_object_vars($returnObject);
|
||||
}
|
||||
return $returnObject;
|
||||
}
|
||||
|
||||
@ -289,7 +284,8 @@ class Zend_Amf_Parse_Amf0_Deserializer extends Zend_Amf_Parse_Deserializer
|
||||
*/
|
||||
public function readAmf3TypeMarker()
|
||||
{
|
||||
$deserializer = $this->getDeserializer();
|
||||
require_once 'Zend/Amf/Parse/Amf3/Deserializer.php';
|
||||
$deserializer = new Zend_Amf_Parse_Amf3_Deserializer($this->_stream);
|
||||
$this->_objectEncoding = Zend_Amf_Constants::AMF3_OBJECT_ENCODING;
|
||||
return $deserializer->readTypeMarker();
|
||||
}
|
||||
@ -304,18 +300,4 @@ class Zend_Amf_Parse_Amf0_Deserializer extends Zend_Amf_Parse_Deserializer
|
||||
{
|
||||
return $this->_objectEncoding;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get deserializer
|
||||
*
|
||||
* @return Zend_Amf_Parse_Amf3_Deserializer
|
||||
*/
|
||||
public function getDeserializer()
|
||||
{
|
||||
if (null === $this->_deserializer) {
|
||||
require_once 'Zend/Amf/Parse/Amf3/Deserializer.php';
|
||||
$this->_deserializer = new Zend_Amf_Parse_Amf3_Deserializer($this->_stream);
|
||||
}
|
||||
return $this->_deserializer;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user