Directly return data instead of using an Output method
This commit is contained in:
@@ -51,8 +51,7 @@ abstract class WebService
|
||||
$data = array();
|
||||
|
||||
try {
|
||||
$this->Call();
|
||||
$data["result"][$this->func] = $this->Output();
|
||||
$data["result"][$this->func] = $this->Call();
|
||||
} catch (WebException $e) {
|
||||
$data["error"]["code"] = $e->getCode();
|
||||
$data["error"]["name"] = $e->getName();
|
||||
@@ -107,11 +106,9 @@ abstract class WebService
|
||||
|
||||
$this->log("Calling '".$this->func."'");
|
||||
$this->log("Params: ".print_r($params, true), 2);
|
||||
call_user_func_array(array($this, $this->func), $params);
|
||||
return call_user_func_array(array($this, $this->func), $params);
|
||||
}
|
||||
|
||||
abstract protected function Output();
|
||||
|
||||
private function Send(array $data)
|
||||
{
|
||||
ob_clean();
|
||||
|
||||
Reference in New Issue
Block a user