src/Router.php
public function execArgv(array $argv = null)
    {
        try {
            $this->handleArgv($argv);
            // @codeCoverageIgnoreStart
        } catch (NoRouteFoundException $e) {
            fwrite(STDERR, 'Usage Error: ' . $e->getMessage() . PHP_EOL);

            // sysexits.h: #define EX_USAGE 64 /* command line usage error */
            exit(64);
        } catch (Exception $e) {
            fwrite(STDERR, 'Program Error: ' . $e->getMessage() . PHP_EOL);

            // stdlib.h: #define EXIT_FAILURE 1
            exit(1);
        }
        // @codeCoverageIgnoreEnd
    }
public function execArgv(array $argv = null)
    {
        try {
            $this->handleArgv($argv);
            // @codeCoverageIgnoreStart
        } catch (NoRouteFoundException $e) {
            fwrite(STDERR, 'Usage Error: ' . $e->getMessage() . PHP_EOL);

            // sysexits.h: #define EX_USAGE 64 /* command line usage error */
            exit(64);
        } catch (Exception $e) {
            fwrite(STDERR, 'Program Error: ' . $e->getMessage() . PHP_EOL);

            // stdlib.h: #define EXIT_FAILURE 1
            exit(1);
        }
        // @codeCoverageIgnoreEnd
    }
public function execArgv ( array $ argv = null ) { try { $ this -> handleArgv ( $ argv ) ; // @codeCoverageIgnoreStart } catch ( NoRouteFoundException $ e ) { fwrite ( STDERR , 'Usage Error: ' . $ e -> getMessage ( ) . PHP_EOL ) ; // sysexits.h: #define EX_USAGE 64 /* command line usage error */ exit ( 64 ) ; } catch ( Exception $ e ) { fwrite ( STDERR , 'Program Error: ' . $ e -> getMessage ( ) . PHP_EOL ) ; // stdlib.h: #define EXIT_FAILURE 1 exit ( 1 ) ; } // @codeCoverageIgnoreEnd }
Executes by matching the `argv` against all registered routes and then exits

This is a convenience method that will match and execute a route and then
exit the program without returning.

If no route could be found or if the route callback throws an Exception,
it will print out an error message to STDERR and set an appropriate
non-zero exit code.

Note that this is for convenience only and only useful for the most
simple of all programs. If you need more control, then consider using
the underlying `handleArgv()` method and handle any error situations
yourself.

You can explicitly pass in your `argv` or it will automatically use the
values from the $_SERVER superglobal. The `argv` is an array that will
always start with the calling program as the first element. We simply
ignore this first element and then process the remaining elements
according to the registered routes.

@param array $argv
@uses self::handleArgv()
Executes by matching the argv against all registered routes and then exits