protected function getConnectionFactory($type)
    {
        if (false === isset($this->connectionFactories[$type])) {
            throw new \InvalidArgumentException("Missing connection factory \"$type\"");
        }

        return $this->connectionFactories[$type];
    }