I have a service defined in my config.yml
services: kinorm_pdo: class: Pate\KinormBundle\Dbal\Db arguments: [%kinorm.db_driver%,%kinorm.db_user%,%kinorm.db_pass%,%kinorm.db_name%,%kinorm.db_host%,%kinorm.db_charset%]
But I want to have access to this service in a class that is not a controller, and I do not understand how to access the container without inserting it.
Basically i just wanna do
$user = new User();
and have inside the user access to the container ...
Thanks for any advice!
source share