-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathSoapObjectWrapper.php
51 lines (46 loc) · 1.22 KB
/
SoapObjectWrapper.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
* @link https://github.com/borodulin/yii2-services
* @license https://github.com/borodulin/yii2-services/blob/master/LICENSE.md
*/
namespace conquer\services;
/**
* SoapObjectWrapper is a wrapper class internally used when SoapServer::setObject() is not defined.
*
* @author Qiang Xue <[email protected]>
* @package system.web.services
*/
class SoapObjectWrapper
{
/**
* @var object the service provider
*/
public $object = null;
/**
* Constructor.
* @param object $object the service provider
*/
public function __construct($object)
{
$this->object = $object;
}
/**
* PHP __call magic method.
* This method calls the service provider to execute the actual logic.
* @param string $name method name
* @param array $arguments method arguments
* @return mixed method return value
*/
public function __call($name, $arguments)
{
return call_user_func_array([$this->object, $name], $arguments);
}
/**
* Returns the fully qualified name of this class.
* @return string the fully qualified name of this class.
*/
public static function className()
{
return get_called_class();
}
}