I've seen in some github projects (ForumBundle, arsjerm), advice from
jmikola and in Symfony from the Trenches talk in sflive#11(http://
www.slideshare.net/jwage/symfony2-from-the-trenches) that it's
recommended to NOT extend from de base controller, as it is a tool for
beginners.

If I don't extend from base controller I mostly need to inject DIC
into controlers when defining service and have in each controller a
setContainer method, or pass within de constructor.

<service id="comment.controller" class="%comment.controller.class%">
             ....
            <call method="setContainer">
                <argument type="service" id="service_container" />
            </call>
</service>

If I need to create the setContainer method in every container why
don't create an interface, let's say 'BaseController', but..... why
should i create a new interface when Controller already does it?

Can't see de advantages of not extending form Controller (Unit
testing?)
A bit of clarify in this subject will be appreciated.

Regards.

P.D: Great work with symfony2!!!

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to