當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_Amf_Parse_Amf3_Deserializer類代碼示例

本文整理匯總了PHP中Zend_Amf_Parse_Amf3_Deserializer的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Amf_Parse_Amf3_Deserializer類的具體用法?PHP Zend_Amf_Parse_Amf3_Deserializer怎麽用?PHP Zend_Amf_Parse_Amf3_Deserializer使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Zend_Amf_Parse_Amf3_Deserializer類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: decode

 public function decode($data)
 {
     $this->init();
     require_once $this->path . 'InputStream.php';
     require_once $this->path . 'Amf3/Deserializer.php';
     $stream = new Zend_Amf_Parse_InputStream(substr($data, 1));
     $deserializer = new Zend_Amf_Parse_Amf3_Deserializer($stream);
     return $deserializer->readTypeMarker();
 }
開發者ID:emildev35,項目名稱:processmaker,代碼行數:9,代碼來源:amfformat.php

示例2: unserialize

 /**
  * Deserialize an AMF3 value to PHP
  *
  * @param  mixed $value
  * @param  array $opts
  * @return string
  * @throws Zend_Serializer_Exception
  */
 public function unserialize($value, array $opts = array())
 {
     try {
         $stream = new Zend_Amf_Parse_InputStream($value);
         $deserializer = new Zend_Amf_Parse_Amf3_Deserializer($stream);
         return $deserializer->readTypeMarker();
     } catch (Exception $e) {
         throw new Zend_Serializer_Exception('Unserialization failed by previous error', 0, $e);
     }
 }
開發者ID:trigoesrodrigo,項目名稱:icingaweb2,代碼行數:18,代碼來源:Amf3.php

示例3: readAmf3TypeMarker

 /**
  * AMF3 data type encountered load AMF3 Deserializer to handle
  * type markers.
  *
  * @return string
  */
 public function readAmf3TypeMarker()
 {
     require_once PHP_LIBRARY_PATH . '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();
 }
開發者ID:netixx,項目名稱:Stock,代碼行數:13,代碼來源:Deserializer.php

示例4: getData

 public function getData()
 {
     $data = file_get_contents('php://input');
     if ($this->format == RestFormat::AMF) {
         require_once 'Zend/Amf/Parse/InputStream.php';
         require_once 'Zend/Amf/Parse/Amf3/Deserializer.php';
         $stream = new Zend_Amf_Parse_InputStream($data);
         $deserializer = new Zend_Amf_Parse_Amf3_Deserializer($stream);
         $data = $deserializer->readTypeMarker();
     } else {
         $data = json_decode($data);
     }
     return $data;
 }
開發者ID:csteven,項目名稱:Provisioner,代碼行數:14,代碼來源:RestServer.php

示例5: readAmf3TypeMarker

 /**
  * AMF3 data type encountered load AMF3 Deserializer to handle
  * type markers.
  *
  * @return string
  */
 public function readAmf3TypeMarker()
 {
     $deserializer = new Zend_Amf_Parse_Amf3_Deserializer($this->_stream);
     $this->_objectEncoding = Zend_Amf_Constants::AMF3_OBJECT_ENCODING;
     return $deserializer->readTypeMarker();
 }
開發者ID:NerdGZ,項目名稱:icingaweb2,代碼行數:12,代碼來源:Deserializer.php

示例6: readObject

 /**
  * Read an object from the AMF stream and convert it into a PHP object
  *
  * @todo   Rather than using an array of traitsInfo create Zend_Amf_Value_TraitsInfo
  * @return object|array
  */
 public function readObject()
 {
     $returnObject = parent::readObject();
     /*if ($returnObject instanceof \Doctrine\Common\Collections\ArrayCollection) {
     			// If the object we are deserializing is an ArrayCollection we need to set its contents to externalizedData
     			$returnObject->__construct($returnObject->externalizedData);
     		}*/
     /*if ($returnObject instanceof \Flextrine\Collections\FlextrinePersistentCollection) {
     			// If the object we are deserializing is an FlextrinePersistentCollection we need to set its contents to source
     			// TODO: This could maybe be done in __set instead...
     			$returnObject->__construct($returnObject->source);
     		}*/
     return $returnObject;
 }
開發者ID:rico,項目名稱:micemeta-flextrine,代碼行數:20,代碼來源:Deserializer.php


注:本文中的Zend_Amf_Parse_Amf3_Deserializer類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。