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


PHP Zend_XmlRpc_Server::getFunctions方法代碼示例

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


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

示例1: testFunctions

 /**
  * get/loadFunctions() test
  */
 public function testFunctions()
 {
     $expected = $this->_server->listMethods();
     $functions = $this->_server->getFunctions();
     $server = new Server();
     $server->loadFunctions($functions);
     $actual = $server->listMethods();
     $this->assertSame($expected, $actual);
 }
開發者ID:rafalwrzeszcz,項目名稱:zf2,代碼行數:12,代碼來源:ServerTest.php

示例2: save

 /**
  * Cache a file containing the dispatch list.
  *
  * Serializes the XMLRPC server callbacks array and stores the information
  * in Zend_Cache_Core
  *
  * @param string             $id
  * @param Zend_Cache_Core    $coreCache
  * @param Zend_XmlRpc_Server $server
  * @return bool
  */
 public static function save($id, Zend_Cache_Core $coreCache, Zend_XmlRpc_Server $server)
 {
     // Get function list
     $methods = $server->getFunctions();
     // Remove system.* methods
     foreach ($methods as $name => $method) {
         if ($method->system) {
             unset($methods[$name]);
         }
     }
     // Store
     return (bool) $coreCache->save(serialize($methods), $id, array(), null);
 }
開發者ID:BGCX262,項目名稱:zym-svn-to-git,代碼行數:24,代碼來源:Cache.php

示例3: testFunctions

 /**
  * get/loadFunctions() test
  */
 public function testFunctions()
 {
     try {
         $this->_server->addFunction(array('Zend_XmlRpc_Server_testFunction', 'Zend_XmlRpc_Server_testFunction2'), 'zsr');
     } catch (Zend_XmlRpc_Exception $e) {
         $this->fail('Error attaching functions: ' . $e->getMessage());
     }
     $expected = $this->_server->listMethods();
     $functions = $this->_server->getFunctions();
     $server = new Zend_XmlRpc_Server();
     $server->loadFunctions($functions);
     $actual = $server->listMethods();
     $this->assertSame($expected, $actual);
 }
開發者ID:crodriguezn,項目名稱:crossfit-milagro,代碼行數:17,代碼來源:ServerTest.php

示例4: save

 /**
  * Cache a file containing the dispatch list.
  *
  * Serializes the XMLRPC server callbacks array and stores the information
  * in $filename.
  *
  * Returns false on any error (typically, inability to write to file), true
  * on success.
  *
  * @param string $filename
  * @param Zend_XmlRpc_Server $server
  * @return bool
  */
 public static function save($filename, Zend_XmlRpc_Server $server)
 {
     if (!is_string($filename) || !file_exists($filename) && !is_writable(dirname($filename))) {
         return false;
     }
     // Remove system.* methods
     $methods = $server->getFunctions();
     foreach ($methods as $name => $method) {
         if ($method->system) {
             unset($methods[$name]);
         }
     }
     // Store
     if (0 === @file_put_contents($filename, serialize($methods))) {
         return false;
     }
     return true;
 }
開發者ID:villos,項目名稱:tree_admin,代碼行數:31,代碼來源:Cache.php


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