allow filtering and altering output before it is sent

master
Guillermo Dev 7 years ago
parent 941b47eb06
commit e65b4d1bd3

@ -38,6 +38,7 @@ abstract class WebService
$result = $this->call($sendSession);
$data["result"][$this->func] = $result;
$data = $this->filterOutput($data);
} catch (WebException $e) {
@ -152,9 +153,21 @@ abstract class WebService
/**
* Allow subclasses to filter params by overriding this
* @param $params
* @param array
*/
protected function filterParams($params)
{
return $params;
}
/**
* Allow subclasses to filter the output before it is sent
* by overriding this method
* @param $params
* @return array
*/
protected function filterOutput(array $data)
{
return $data;
}
}

Loading…
Cancel
Save