symfony - Translation inside a service best practice -
i need translate text inside service symfony2 application. heard it's not best practice pass container. simple examples? thanks
indeed it's bad practice pass container argument of service, instead should inject translator :
my.service: class: my\appbundle\myservice arguments: ["@translator"]
Comments
Post a Comment