KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I read this: http://symfony.com/doc/current/book/service_container.html It said: $mailer = $this->get('my_mailer'); As an added bonus, the Mailer service is only created once and the same instance is returned each time you ask for the service. This is almost always the behavior you'll need (it's more flexible and powerful), but we'll learn later how you can configure a service that has multiple instances. How do I make my service to have multiple instances -- i.e. whenever I reach the service I am given a new instance? Something like $this->getNew() or something?
Tags (comma-separated)
Save Edits
Cancel