XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
NuSoapLoader.class.php
1<?php
10
11if (!defined('XOOPS_ROOT_PATH')) {
12 exit();
13}
14
16{
17 public function preFilter()
18 {
19 $this->mRoot->mDelegateManager->add('XCube_ServiceManager.CreateClient', 'Legacy_NuSoapLoader::createClient');
20 $this->mRoot->mDelegateManager->add('XCube_ServiceManager.CreateServer', 'Legacy_NuSoapLoader::createServer');
21 }
22
28 public static function createClient(&$client, $service)
29 {
30 if (is_object($client)) {
31 return;
32 }
33
34 $root =& XCube_Root::getSingleton();
35
36 if (is_object($service) && is_a($service, 'XCube_Service')) {
37 $client = new XCube_ServiceClient($service);
38 } else {
39 require_once XOOPS_ROOT_PATH . '/modules/legacy/lib/nusoap/nusoap.php';
40 require_once XOOPS_ROOT_PATH . '/modules/legacy/lib/ShadePlus/SoapClient.class.php';
41
42 $client = new ShadePlus_SoapClient($service);
43 }
44 }
45
51 public static function createServer(&$server, $service)
52 {
53 if (is_object($server) || !is_object($service)) {
54 return;
55 }
56
57 require_once XOOPS_ROOT_PATH . '/modules/legacy/lib/nusoap/nusoap.php';
58 require_once XOOPS_ROOT_PATH . '/modules/legacy/lib/ShadePlus/ServiceServer.class.php';
59 require_once XOOPS_ROOT_PATH . '/modules/legacy/lib/ShadeSoap/NusoapServer.class.php';
60
61 $server = new ShadePlus_ServiceServer($service);
62 $server->prepare();
63 }
64}
static createClient(&$client, $service)
static createServer(&$server, $service)
preFilter()
[Abstract] Executes the logic, when the controller executes preFilter().
[Abstract] Interface to be used for accessing a Service.