Beispiel #1
0
 /** 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);
 }
Beispiel #2
0
 public function __construct($realm, $callback)
 {
     $this->realm = $realm;
     parent::__construct($callback);
 }
Beispiel #3
0
 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);
 }