Example #1
0
 /**
  * Call the function associated with this route
  * @return returns the function result
  */
 public function call(Request $request)
 {
     if (array_key_exists('locale', $this->arguments)) {
         $request->setLocale($this->arguments['locale']);
         unset($this->arguments['locale']);
     }
     $arguments = array_values($this->arguments);
     array_unshift($arguments, $request);
     return call_user_func_array(array(new $this->controller(), $this->action), $arguments);
 }