/** Calls a routine on the current route and returns its result */ public function routineCall($type, $method, AbstractRoutine $routine, &$routeParamsValues) { $reflection = $this->route->getReflection($method); $callbackParameters = array(); if ($routine instanceof ParamSynced) { foreach ($routine->getParameters() as $parameter) { $callbackParameters[] = $this->extractRouteParam($reflection, $parameter, $routeParamsValues); } } else { $callbackParameters = $routeParamsValues; } return $routine->{$type}($this, $callbackParameters); }
protected function syncCall($method, AbstractRoutine $routine, &$params) { $reflection = $this->getReflection($method); $cbParams = array(); foreach ($routine->getParameters() as $p) { $cbParams[] = $this->extractParam($reflection, $p, $params); } return $routine->call($this, $cbParams); }