如何在symfony框架中更好地组织控制器? [关闭]

I have a lot of controllers and I need to abstract all common behavior, so I want to know what is the best practice to organize it.

I think that will be organized if I put all my controllers in the controllers folder and create subfolders with abstract code respecting the semantic of name of context of each controller as convention.

There shouldn't be very much common behavior between your controllers. If you do have duplicate code or common behavior, then it should probably be refactored out to a service. Thin controllers, fat models & services.

Knp University has a really good (and free) screencast on the topic:

http://knpuniversity.com/screencast/question-answer-day/model-organization