I have a service setup in symfony 2.6 by name ge_lib
and it looks like below
ge_lib:
class: GE\RestBundle\Services\GELib
arguments: [@session, @doctrine.orm.entity_manager, @manage_ge_proc]
inside GELib.php I have a requirement to use a function from another service manage_ge_proc
manage_ge_proc:
class: GE\RestBundle\Services\GEManageProcedure
arguments: [@doctrine.orm.entity_manager, @manage_ge_native_query]
if I try to use it this way, it is not working
$emailInv = $this->get('manage_ge_proc');
$sendStatus = $emailInv->pSendGeneralEmail(.....);
It gives error saying that unable to find any get function by that name. generally this -> $this->get('manage_ge_proc');
works in any controller.But how do i use it in service?.
I tried $this->getContainer()->get('manage_ge_proc');
but it did not work.