I want to be able to use $this->container in class below but how do I pass container to it with yml below? Or do I really need to pass it to access $this->container->getParameter('currency'); ?
I did all the others as the example shows but failing to pass the container!
Thanks in advance
I have this code in config.yml:
services:
data_cash:
class: Booking\FrontendBundle\WebService\CashManager
arguments: [@doctrine.orm.entity_manager, %paymentCallback%, %kernel.environment%]
This is the CashManager class:
class CashManager
{
public function __construct($entityManager, $callback, $environment, $CONTAINER)
{
//$this->currency = $CONTAINER->getParameter('currency');
}
}