public function getResponseEmitter()
    {
        if (!$this->getContainer()->has(Response\EmitterInterface::class)) {
            $this->getContainer()->share(Response\EmitterInterface::class, new Response\SapiEmitter());
        }

        /** @var Response\EmitterInterface $contract */
        $contract = $this->validateContract($this->getContainer()->get(Response\EmitterInterface::class),
            Response\EmitterInterface::class);
        return $contract;
    }