src/Router.php
public function handleArgs(array $args)
    {
        foreach ($this->routes as $route) {
            $input = $args;
            $output = array();
            if ($route->matches($input, $output)) {
                return $route($output);
            }
        }

        throw new NoRouteFoundException('No matching route found');
    }
public function handleArgs(array $args)
    {
        foreach ($this->routes as $route) {
            $input = $args;
            $output = array();
            if ($route->matches($input, $output)) {
                return $route($output);
            }
        }

        throw new NoRouteFoundException('No matching route found');
    }
public function handleArgs ( array $ args ) { foreach ( $ this -> routes as $ route ) { $ input = $ args ; $ output = array ( ) ; if ( $ route -> matches ( $ input , $ output ) ) { return $ route ( $ output ) ; } } throw new NoRouteFoundException ( 'No matching route found' ) ; }
Executes by matching the given args against all registered routes and then returns

Unlike `handleArgv()` this method will use the complete `$args` array
to match the registered routes (i.e. it will not ignore the first element).
This is particularly useful if you build this array yourself or if you
use an interactive command line interface (CLI) and ask your user to
supply the arguments.

The arguments have to be given as an array of individual elements. If you
only have a command line string that you want to split into an array of
individual command line arguments, consider using clue/arguments.

@param array $args
@return mixed will be the return value from the matched route callback
@throws Exception if the executed route callback throws an exception
@throws NoRouteFoundException If no matching route could be found
Executes by matching the given args against all registered routes and then returns