本文整理匯總了PHP中Wikia::getAnswersSitenames方法的典型用法代碼示例。如果您正苦於以下問題:PHP Wikia::getAnswersSitenames方法的具體用法?PHP Wikia::getAnswersSitenames怎麽用?PHP Wikia::getAnswersSitenames使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Wikia
的用法示例。
在下文中一共展示了Wikia::getAnswersSitenames方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: fixSubdomains
/**
* set subdomain name
*
* @access private
* @author Piotr Molski (moli)
* @author Krzysztof Krzyżaniak (eloy)
*
* @return
*/
private function fixSubdomains($lang)
{
global $wgContLang;
wfProfileIn(__METHOD__);
switch ($this->mType) {
case "answers":
$this->mDomains = Wikia::getAnswersDomains();
print_r($this->mDomains);
$this->mSitenames = Wikia::getAnswersSitenames();
if (isset($this->mDomains[$lang]) && !empty($this->mDomains[$lang])) {
$this->mDefSubdomain = sprintf("%s.%s", $this->mDomains[$lang], self::DEFAULT_DOMAIN);
$this->mLangSubdomain = false;
} else {
$this->mDefSubdomain = sprintf("%s.%s", $this->mDomains["default"], self::DEFAULT_DOMAIN);
$this->mLangSubdomain = true;
}
if (isset($this->mSitenames[$lang])) {
$this->mDefSitename = $this->mSitenames[$lang];
} elseif (isset($this->mDomains[$lang]) && !empty($this->mDomains[$lang])) {
$this->mDefSitename = $wgContLang->ucfirst($this->mDomains[$lang]);
} else {
$this->mDefSitename = $wgContLang->ucfirst($this->mDomains['default']);
}
break;
default:
$this->mDefSubdomain = self::DEFAULT_DOMAIN;
$this->mDefSitename = self::DEFAULT_NAME;
$this->mDomains = array('default' => '');
$this->mSitenames = array();
$this->mLangSubdomain = true;
}
wfProfileOut(__METHOD__);
}