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


PHP IXR_Server類代碼示例

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


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

示例1: RemoteAPI

 /**
  * Constructor. Register methods and run Server
  */
 function dokuwiki_xmlrpc_server()
 {
     $this->remote = new RemoteAPI();
     $this->remote->setDateTransformation(array($this, 'toDate'));
     $this->remote->setFileTransformation(array($this, 'toFile'));
     parent::__construct();
 }
開發者ID:kevinlovesing,項目名稱:dokuwiki,代碼行數:10,代碼來源:xmlrpc.php

示例2: __construct

 /**
  * Constructor. Register methods and run Server
  */
 public function __construct()
 {
     $this->remote = new RemoteAPI();
     $this->remote->setDateTransformation(array($this, 'toDate'));
     $this->remote->setFileTransformation(array($this, 'toFile'));
     parent::__construct();
 }
開發者ID:splitbrain,項目名稱:dokuwiki,代碼行數:10,代碼來源:xmlrpc.php

示例3: call

 function call($methodname, $args)
 {
     // Make sure it's in an array
     if ($args && !is_array($args)) {
         $args = array($args);
     }
     // Over-rides default call method, adds signature check
     if (!$this->hasMethod($methodname)) {
         return new IXR_Error(-32601, 'server error. requested method "' . $this->message->methodName . '" not specified.');
     }
     $method = $this->callbacks[$methodname];
     $signature = $this->signatures[$methodname];
     $returnType = array_shift($signature);
     // Check the number of arguments
     if (count($args) != count($signature)) {
         return new IXR_Error(-32602, 'server error. wrong number of method parameters');
     }
     // Check the argument types
     $ok = true;
     $argsbackup = $args;
     for ($i = 0, $j = count($args); $i < $j; $i++) {
         $arg = array_shift($args);
         $type = array_shift($signature);
         switch ($type) {
             case 'int':
             case 'i4':
                 if (is_array($arg) || !is_int($arg)) {
                     $ok = false;
                 }
                 break;
             case 'base64':
             case 'string':
                 if (!is_string($arg)) {
                     $ok = false;
                 }
                 break;
             case 'boolean':
                 if ($arg !== false && $arg !== true) {
                     $ok = false;
                 }
                 break;
             case 'float':
             case 'double':
                 if (!is_float($arg)) {
                     $ok = false;
                 }
                 break;
             case 'date':
             case 'dateTime.iso8601':
                 if (!is_a($arg, 'IXR_Date')) {
                     $ok = false;
                 }
                 break;
         }
         if (!$ok) {
             return new IXR_Error(-32602, 'server error. invalid method parameters');
         }
     }
     // It passed the test - run the "real" method call
     return parent::call($methodname, $argsbackup);
 }
開發者ID:vdanelia,項目名稱:GeniXCMS,代碼行數:61,代碼來源:IXR_Library.php

示例4: serve

 function serve($data = false)
 {
     parent::serve($data);
 }
開發者ID:BackupTheBerlios,項目名稱:tulipan-svn,代碼行數:4,代碼來源:xmlrpc_server.php

示例5:

 /**
  * Register service and construct helper
  */
 function __construct()
 {
     /** @var helper_plugin_blogtng_linkback tools */
     $this->tools = plugin_load('helper', 'blogtng_linkback');
     parent::__construct(array('pingback.ping' => 'this:ping'));
 }
開發者ID:stupid-beard,項目名稱:plugin-blogtng,代碼行數:9,代碼來源:pingback.php

示例6: __construct

 /**
  * Constructor. Defines the API and starts the server
  *
  * In the constructor, the API for the server is defined
  * by placing method names inside the method array. These
  * methods must then be defined later in this class. See
  * the format of the method for clues on how to add more.
  */
 public function __construct()
 {
     $this->methods = array('jobs.getMachines' => 'this:jobs_getMachines', 'jobs.getAllPlugins' => 'this:jobs_getAllPlugins', 'jobs.getProfilePlugins' => 'this:jobs_getProfilePlugins', 'jobs.getProfileSettings' => 'this:jobs_getProfileSettings', 'jobs.getPendingProfileIds' => 'this:jobs_getPendingProfileIds', 'jobs.getStatus' => 'this:jobs_getStatus', 'jobs.getCancel' => 'this:jobs_getCancel', 'jobs.getCountRunning' => 'this:jobs_getCountRunning', 'jobs.getPluginsBySeverity' => 'this:jobs_getPluginsBySeverity', 'jobs.getPluginsByFamily' => 'this:jobs_getPluginsByFamily', 'jobs.getSpecialProfileItems' => 'this:jobs_getSpecialProfileItems', 'jobs.setResetCancel' => 'this:jobs_setResetCancel', 'jobs.setProgress' => 'this:jobs_setProgress', 'jobs.setStatus' => 'this:jobs_setStatus', 'jobs.setFinishedDate' => 'this:jobs_setFinishedDate', 'jobs.saveReport' => 'this:jobs_saveReport', 'jobs.emailResults' => 'this:jobs_emailResults', 'jobs.addExemption' => 'this:jobs_addExemption');
     parent::__construct($this->methods);
 }
開發者ID:TheProjecter,項目名稱:nessquik,代碼行數:13,代碼來源:jobs.php

示例7: PingbackServer

 /**
  * Register service and construct helper
  */
 function PingbackServer()
 {
     $this->tools =& plugin_load('helper', 'blogtng_linkback');
     parent::__construct(array('pingback.ping' => 'this:ping'));
 }
開發者ID:stretchyboy,項目名稱:plugin-blogtng,代碼行數:8,代碼來源:pingback.php


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