version = $version; switch ($version) { case self::V4: $this->request = new ApiVersion4($url, $apiKey, $version, $site, $debug); break; case self::V3: $this->request = new ApiVersion3($url, $apiKey, $version, $site, $debug); break; default: $this->request = new ApiVersion5($url, $apiKey, $version, $site, $debug); break; } } /** * Get API version * * @return string */ public function getVersion() { return $this->version; } /** * Set logger * * @param LoggerInterface|null $logger */ public function setLogger($logger = null) { $this->request->setLogger($logger); } }