/** * 显示命令输入帮助信息 */ public function help() { Stdout::title('This is H2O version ' . \H2O::getVersion()); //命令行引导入口信息 $index = $GLOBALS['argv'][0]; //命令行使用 Stdout::table([['route', 'COMMAND <route> [--option1=value1 --option2=value2 ... ]'], ['example for system module', $index . ' @migrate.create --name=all'], ['example for user define', $index . ' hello.index --test=info']]); //数据迁移模块 Stdout::table([['migrate', 'Manages application migrations', 'Params list'], ['@migrate.create', 'Create a new migrate', '--name=test'], ['@migrate.up', 'Update a new migrate', '--name=test'], ['@migrate.restore', 'Restore a new migrate', '--name=test'], ['@migrate.all', 'Update/Restore all migrate', '--type=up'], ['', '', '--type=restore']]); //后台离线服务程序 Stdout::table([['service', 'Background offline service', 'Params list'], ['@service.start', 'Start a service', '--c=hello.world'], ['@service.cat', 'Cat a service', '--c=hello.world'], ['', '', 'empty is all view all services'], ['@service.stop', 'Stop a service', '--c=hello.world'], ['', '', '--c=hello.world --p=proid'], ['', '', 'empty stop all services']]); //自动化开发工具 Stdout::table([['gii', 'Automation development tools'], ['@gii.web', 'Create web application'], ['@gii.cli', 'Create command line application'], ['@gii.model', 'Create model program '], ['@gii.simple', 'Create simple group application']]); echo Stdout::get(); exit; }