Symfony2 create a service [closed]

浪尽此生 提交于 2019-12-23 13:16:20

问题


There used to be a how-to in the symfony2 doc on how to create a service (my_mailer) but I can't seem to find it anywhere.

Can anyone tell me where to find it, or some other tutorial on how to create a service in symfony2 ?


回答1:


Service Container - http://symfony.com/doc/current/book/service_container.html

Creating/Configuring Services in the Container - http://symfony.com/doc/current/book/service_container.html#creating-configuring-services-in-the-container

Great example of a service - a Twig Extension - http://symfony.com/doc/current/cookbook/templating/twig_extension.html



来源:https://stackoverflow.com/questions/15085376/symfony2-create-a-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!