In case a route is defined as "foo bar" it should always expect 2 parameters and must not match if there are 3 or more arguments supplied. This logic does not include flags (i.e. --foo, -f) that can appear in any order on the command line and can be mixed with positional arguments in any combination.
…ctions to "http-and-console" example.
This prototype includes a single controller which contains: - usageAction() - returning a string with usage info, that is automatically transformed to a ViewModel and output to Console. - indexAction() - directly accessing Zend\Console\Console to display an animated screensaver. The application is configured via Application's module.config.php, which defines Console routes to match against. Default route runs indexAction while "usage" route handles "--help" and "--usage" command-line parameters. There are additional runtime options that can be modified by supplying optional command-line parameters.