/** * @inheritdoc */ public function getApiUrl(LanguageInterface $language) { $languageCode = $language->getCode(); $domain = $this->getDomain(); $apiUrl = "https://{$languageCode}.{$domain}/w/api.php"; return $apiUrl; }
/** * @param LanguageInterface $language * @return string File name to save item to. */ private function getFileName(LanguageInterface $language) { $fileName = null; if ($this->fileName !== null) { $fileName = $this->fileName; } elseif ($language !== null) { $fileName = $language->getCode(); } return $fileName; }
/** * Adds a category title for the given language. * @param LanguageInterface $language Language of the corresponding category. * @param string $title Category title for the corresponding language. */ protected function setTitle(LanguageInterface $language, $title) { $languageCode = $language->getCode(); $this->titles[$languageCode] = $title; }