简体   繁体   中英

Is it possible to pass parameter as namespace in Symfony console?

I'd like to pass parameter to Symfony Console thus commandName:parameter1 parameter2 . Is it possible and how I can do it?

Yes, it is possible with the addArgument method. you should call it in constructor. There is a full example in the documentation that explains how to use it.

But, the format will be commandName parameter1 parameter2 or app:commandName parameter1 parameter2 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM