public function getListenerInstance(EventDispatcher $eventDispatcher = null, StreamableInterface $stream = null)
    {
        //instantiate the key matcher object
        $reflection = new \ReflectionClass('\\Iber\\Phkey\\Environment\\' . $this->getEnvironment() . '\\Matcher');
        $matcher = $reflection->newInstance();

        $reflection = new \ReflectionClass('\\Iber\\Phkey\\Environment\\' . $this->getEnvironment() . '\\Listener');

        if (null === $eventDispatcher) {
            $eventDispatcher = new EventDispatcher();
        }

        if (null === $stream) {
            $stream = new Stream();
        }

        $listener = $reflection->newInstance($matcher, $eventDispatcher, $stream);

        return $listener;
    }