dsj2222222 2012-07-08 15:12
浏览 32
已采纳

在Symfony2控制器上使用命名空间

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?

  • 写回答

1条回答 默认 最新

  • douxi6903 2012-07-08 15:18
    关注

    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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部