Here is an example, taken from Symfony2 website, about defining a custom service (YAML notation):
services:
newsletter_manager:
class: %newsletter_manager.class%
arguments: [@mailer, @templating]
Is there a list of default Symfony2 service objects that can be injected into a custom service as parameters (like @mailer
, @templating
, @doctrine
)?
I know that they come from the Container
(which is available, for example, in each Controller
class). I've tryed to dump all services, but i'm looking for a more detailed list:
php app/console container:debug
logger container Symfony\Bridge\Monolog\Logger
mailer container Swift_Mailer
translator n/a alias for translator.default
...
php app/console container:debug
will give you a list of all the registered services