| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
require_once(AK_LIB_DIR.DS.'AkInflector.php'); |
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
class AkActionWebServiceClient extends AkObject |
|---|
| 22 |
{ |
|---|
| 23 |
var $_available_drivers = array('xml_rpc'); |
|---|
| 24 |
var $_Client; |
|---|
| 25 |
|
|---|
| 26 |
function __construct($client_driver) |
|---|
| 27 |
{ |
|---|
| 28 |
$client_driver = AkInflector::underscore($client_driver); |
|---|
| 29 |
if(in_array($client_driver, $this->_available_drivers)){ |
|---|
| 30 |
$client_class_name = 'Ak'.AkInflector::camelize($client_driver).'Client'; |
|---|
| 31 |
require_once(AK_LIB_DIR.DS.'AkActionWebService'.DS.'Clients'.DS.$client_class_name.'.php'); |
|---|
| 32 |
$this->_Client =& new $client_class_name($this); |
|---|
| 33 |
|
|---|
| 34 |
}else { |
|---|
| 35 |
trigger_error(Ak::t('Invalid Web Service driver provided. Available Drivers are: %drivers', array('%drivers'=>join(', ',$this->_available_drivers))), E_USER_WARNING); |
|---|
| 36 |
} |
|---|
| 37 |
} |
|---|
| 38 |
|
|---|
| 39 |
function init() |
|---|
| 40 |
{ |
|---|
| 41 |
if(method_exists($this->_Client, 'init')){ |
|---|
| 42 |
$args = func_get_args(); |
|---|
| 43 |
call_user_func_array(array($this->_Client, 'init'), $args); |
|---|
| 44 |
} |
|---|
| 45 |
} |
|---|
| 46 |
|
|---|
| 47 |
function hasErrors() |
|---|
| 48 |
{ |
|---|
| 49 |
return $this->_Client->hasErrors(); |
|---|
| 50 |
} |
|---|
| 51 |
|
|---|
| 52 |
function getErrors() |
|---|
| 53 |
{ |
|---|
| 54 |
return $this->_Client->getErrors(); |
|---|
| 55 |
} |
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 |
} |
|---|
| 59 |
|
|---|
| 60 |
?> |
|---|