本文整理汇总了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__);
}