当前位置: 首页>>代码示例>>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;未经允许,请勿转载。