Eren Golge
Eren Golge

Reputation: 810

Using namespace on Symfony2 controller

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?

Upvotes: 0

Views: 279

Answers (1)

MDrollette
MDrollette

Reputation: 6927

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

Upvotes: 2

Related Questions