protected function processPosRoutines($response)
{
$proxyResults = array();
foreach ($this->route->routines as $routine) {
if ($routine instanceof ProxyableThrough) {
$proxyResults[] = $this->routineCall('through', $this->method, $routine, $this->params);
}
}
//Some routine returned a callback as its result. Let's run
//these callbacks on our actual response.
//This is mainly used by accept() and similar ones.
foreach ($proxyResults as $proxyCallback) {
if (is_callable($proxyCallback)) {
$response = call_user_func_array($proxyCallback, array($response));
}
}
return $response;
}