Exemplo n.º 1
0
 public function testCallUserFuncNamed()
 {
     $func = function ($a, $b = 'b', $c = 'd') {
         $this->assertEquals('a', $a);
         $this->assertEquals('b', $b);
         $this->assertEquals('c', $c);
     };
     \Routy\call_user_func_named($func, ['c' => 'c', 'a' => 'a']);
 }
Exemplo n.º 2
0
 public function invoke(Match $match)
 {
     $extras = $match->getRoute()->getExtras();
     \Routy\call_user_func_named($this->callback, $match->getParameters() + $extras);
 }
Exemplo n.º 3
0
 public function invoke(Match $match)
 {
     $route = $match->getRoute();
     $extras = $route->getExtras();
     \Routy\call_user_func_named($this->callback, ['controller' => $extras['controller'], 'action' => $extras['action'], 'parameters' => $match->getParameters()]);
 }