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


PHP Zend_XmlRpc_Value::getGenerator方法代碼示例

本文整理匯總了PHP中Zend_XmlRpc_Value::getGenerator方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_XmlRpc_Value::getGenerator方法的具體用法?PHP Zend_XmlRpc_Value::getGenerator怎麽用?PHP Zend_XmlRpc_Value::getGenerator使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend_XmlRpc_Value的用法示例。


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

示例1: testChangingExceptionResetsGeneratorObject

 public function testChangingExceptionResetsGeneratorObject()
 {
     $generator = Zend_XmlRpc_Value::getGenerator();
     Zend_XmlRpc_Value::setEncoding('UTF-8');
     $this->assertNotSame($generator, Zend_XmlRpc_Value::getGenerator());
     $this->assertEquals($generator, Zend_XmlRpc_Value::getGenerator());
     $generator = Zend_XmlRpc_Value::getGenerator();
     Zend_XmlRpc_Value::setEncoding('ISO-8859-1');
     $this->assertNotSame($generator, Zend_XmlRpc_Value::getGenerator());
     $this->assertNotEquals($generator, Zend_XmlRpc_Value::getGenerator());
 }
開發者ID:sasezaki,項目名稱:mirror-zf1-tests,代碼行數:11,代碼來源:ValueTest.php

示例2: saveXml

 /**
  * Return response as XML
  *
  * @return string
  */
 public function saveXml()
 {
     $value = $this->_getXmlRpcReturn();
     $generator = Zend_XmlRpc_Value::getGenerator();
     $generator->openElement('methodResponse')->openElement('params')->openElement('param');
     $value->generateXml();
     $generator->closeElement('param')->closeElement('params')->closeElement('methodResponse');
     return $generator->flush();
 }
開發者ID:hirentricore,項目名稱:devmagento,代碼行數:14,代碼來源:Response.php

示例3: testGetSetEncoding

 /**
  * Test get/setEncoding()
  */
 public function testGetSetEncoding()
 {
     $this->assertEquals('UTF-8', $this->_server->getEncoding());
     $this->assertEquals('UTF-8', Zend_XmlRpc_Value::getGenerator()->getEncoding());
     $this->assertSame($this->_server, $this->_server->setEncoding('ISO-8859-1'));
     $this->assertEquals('ISO-8859-1', $this->_server->getEncoding());
     $this->assertEquals('ISO-8859-1', Zend_XmlRpc_Value::getGenerator()->getEncoding());
 }
開發者ID:crodriguezn,項目名稱:crossfit-milagro,代碼行數:11,代碼來源:ServerTest.php

示例4: saveXml

 /**
  * Create XML request
  *
  * @return string
  */
 public function saveXml()
 {
     $args = $this->_getXmlRpcParams();
     $method = $this->getMethod();
     $generator = Zend_XmlRpc_Value::getGenerator();
     $generator->openElement('methodCall')->openElement('methodName', $method)->closeElement('methodName');
     if (is_array($args) && count($args)) {
         $generator->openElement('params');
         foreach ($args as $arg) {
             $generator->openElement('param');
             $arg->generateXml();
             $generator->closeElement('param');
         }
         $generator->closeElement('params');
     }
     $generator->closeElement('methodCall');
     return $generator->flush();
 }
開發者ID:bizanto,項目名稱:Hooked,代碼行數:23,代碼來源:Request.php

示例5: saveXml

 /**
  * Serialize fault to XML
  *
  * @return string
  */
 public function saveXml()
 {
     // Create fault value
     $faultStruct = array('faultCode' => $this->getCode(), 'faultString' => $this->getMessage());
     $value = Zend_XmlRpc_Value::getXmlRpcValue($faultStruct);
     $generator = Zend_XmlRpc_Value::getGenerator();
     $generator->openElement('methodResponse')->openElement('fault');
     $value->generateXml();
     $generator->closeElement('fault')->closeElement('methodResponse');
     return $generator->flush();
 }
開發者ID:sepano,項目名稱:open-social-media-monitoring,代碼行數:16,代碼來源:Fault.php


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