How to create this console router? ``` myscript.php zone <command> <args> ``` Command can be: `import` and `export`. `<args>` can be _path_ or _id_ Some problems: ``` zone ``` must print list of available commands (like 'Available commands: import, export') ``` zone import (without any other args) ``` must print help for `zone import` command (like 'usage zone import /path/to/file.json`) ``` zone export ``` must print help for `zone export` command (like 'usage zone export <id>') and now ``` zone import file.json ``` or ``` zone export 100 ``` must launch any one or two functions from `\Foo\Bar` class How can i do this?
How to create this console router?
Command can be:
importandexport.<args>can be path or idSome problems:
must print list of available commands (like 'Available commands: import, export')
must print help for
zone importcommand (like 'usage zone import /path/to/file.json`)must print help for
zone exportcommand (like 'usage zone export ')and now
or
must launch any one or two functions from
\Foo\BarclassHow can i do this?