Esempio n. 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);
 }
Esempio n. 2
0
 public function __construct($realm, $callback)
 {
     $this->realm = $realm;
     parent::__construct($callback);
 }
Esempio n. 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);
 }