我正在编写我的第一个symfony控制台应用程序,我想问一个关于控制台输出的问题。Symfony控制台输出
当我运行像控制台一个新的CLI应用程序:./testapp
然后我得到以下输出:
Usage:
command [options] [arguments]
Options:
--help (-h) Display this help message
--quiet (-q) Do not output any message
--verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version (-V) Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
--no-interaction (-n) Do not ask any interactive question
Available commands:
help Displays help for a command
list Lists commands
有没有办法来消除这种内容的显示?我只想要“可用命令”可见。是否有可能在此显示中创建我自己的组?
这并没有太大的意义,删除选项。你会怎么做? ;)这是你当前命令的选项。 – Stony 2015-04-04 12:13:16
呃..我不想删除选项本身。只有在调用应用程序时显示。所以清理视图可以这么说 – sesc360 2015-04-04 12:14:02
我不明白你的问题;)当你正确地调用你的命令,你不会得到那个输出,然后你的命令被执行。 – Stony 2015-04-04 12:15:12