Command lifecycle
CLI command lifecycle
"Incoming request" for CLI environment we suggest to call Command. Command has simpler lifecycle then web and looks like:
- Framework parses incoming CLI arguments of program and determines the Command corresponding to these arguments.
- Command contains Controller to process this command. Framework starts this Controller and passes incoming CLI arguments to Controller.
- Controller completes request successfully or return error in case of failure.