src/Factory/Controller/ConsoleControllerFactory.php
public function createService(ServiceLocatorInterface $serviceLocator):ConsoleController
    {
        $sl = $serviceLocator->getServiceLocator();

        /* @var $options BernardOptions */
        $options = $sl->get(BernardOptions::class);

        /* @var $consumer Consumer */
        $consumer = $sl->get(Consumer::class);

        /* @var $producer Producer */
        $producer = $sl->get(Producer::class);

        /* @var $queue QueueFactory */
        $queue = $sl->get($options->getQueueInstanceKey());

        return new ConsoleController($producer, $consumer, $queue);
    }
public function createService(ServiceLocatorInterface $serviceLocator):ConsoleController
    {
        $sl = $serviceLocator->getServiceLocator();

        /* @var $options BernardOptions */
        $options = $sl->get(BernardOptions::class);

        /* @var $consumer Consumer */
        $consumer = $sl->get(Consumer::class);

        /* @var $producer Producer */
        $producer = $sl->get(Producer::class);

        /* @var $queue QueueFactory */
        $queue = $sl->get($options->getQueueInstanceKey());

        return new ConsoleController($producer, $consumer, $queue);
    }
{@inheritdoc}