public function setContainer(ContainerInterface $container = null)
    {
        $this->container = $container;
        $this->eventDispatcher = $this->container->get('event_dispatcher');
    }
public function setContainer(ContainerInterface $container = null)
    {
        $this->container = $container;
        $this->eventDispatcher = $this->container->get('event_dispatcher');
    }
public function setContainer ( ContainerInterface $ container = null ) { $ this -> container = $ container ; $ this -> eventDispatcher = $ this -> container -> get ( 'event_dispatcher' ) ; }
Sets the container.

@param ContainerInterface|null $container A ContainerInterface instance or null
Sets the container .