I am pretty new on symfony2 (just reading its own pdf book) and I am curious that is it must to use namespace name as namespace Acme\\HelloBundle\\Controller;
?
It is too long name and can I make it shorter with any other name or do I need to follow the directory path convention to name the namespace of the controller?
It has to match the directory structure. You can view the namespace standard here:
https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
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.