public function createMode($throwException = false, $forceMode = false)
    {
        if (false === $this->enabled && true !== $forceMode) {
            return new NullMode();
        }

        switch ($this->type) {
            case 'apache':
            case 'apache2':
                return new Apache($this->mapping);
            case 'nginx':
                return new Nginx($this->mapping);
            default:
                $this->logger->error('Invalid h264 pseudo streaming configuration.');
                if ($throwException) {
                    throw new InvalidArgumentException(sprintf('Invalid h264 pseudo streaming configuration width type "%s"', $this->type));
                }

                return new NullMode();
        }
    }