src/Samurai/Component/Routing/Router.php
public function dispatch($path = '/', $method = 'GET')
    {
        foreach ($this->rules as $rule)
        {
            if ($rule->matching($path, $method))
                return $rule->toActionCaller($path, $method);
        }
        throw new NotFoundException($path);
    }
public function dispatch($path = '/', $method = 'GET')
    {
        foreach ($this->rules as $rule)
        {
            if ($rule->matching($path, $method))
                return $rule->toActionCaller($path, $method);
        }
        throw new NotFoundException($path);
    }
public function dispatch ( $ path = '/' , $ method = 'GET' ) { foreach ( $ this -> rules as $ rule ) { if ( $ rule -> matching ( $ path , $ method ) ) return $ rule -> toActionCaller ( $ path , $ method ) ; } throw new NotFoundException ( $ path ) ; }
dispatch to action

@param   string  $path
@param   string  $method
@return  Closure
dispatch to action