Directly return data instead of using an Output method

This commit is contained in:
Gilles Crettenand
2015-05-28 09:32:40 +02:00
parent 4c85a079ed
commit fdf081493e
2 changed files with 35 additions and 35 deletions

View File

@@ -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();