zfcampus/zf-console

Commands and subcommands

KarelWintersky opened this issue · 0 comments

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 ')

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?