I agree that there is too much configuration when setting up a controller
service, but this won’t be an issue anymore once we’re able to define a service
and its dependencies using annotations, as everything will be in one place.
/** @Service(“main_controller”) */
class MainController
{
/** @Service */
private $request;
/** @Service */
private $router;
/** @Service(“doctrine.odm.mongodb.document_manager”) */
private $dm;
/** @Route(“/“) */
public function homepage()
{
// ...
}
}
Kris
On Thursday, June 23, 2011 at 11:12 AM, Jordi Boggiano wrote:
> On 23.06.2011 14:17, Benjamin Eberlei wrote:
> > I wouldn't mind getting rid of the service:action notation :) I think its a
> > hack. It makes the routing layer aware of differences of what a controller
> > actually is. That however belongs to the controller resolver layer.
>
> It just means you have to know how to write your route definitions, but
> the resolution of the name is still delegated to the controller resolver
> afaik, the router is oblivious to what's in that variable no?
>
> Anyway, I just think the service:action notation has to stay for people
> that don't want to follow the service naming best practices, but it
> doesn't deserve more than a one liner in the docs if we implement
> service resolution from Foo:Bar:baz.
>
> Cheers
>
> --
> Jordi Boggiano
> @seldaek - http://nelm.io/jordi
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com (http://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]
> (mailto:[email protected])
> To unsubscribe from this group, send email to
> [email protected]
> (mailto:[email protected])
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=en
--
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