當前位置: 首頁>>代碼示例>>PHP>>正文


PHP XLite::getInstallationLng方法代碼示例

本文整理匯總了PHP中XLite::getInstallationLng方法的典型用法代碼示例。如果您正苦於以下問題:PHP XLite::getInstallationLng方法的具體用法?PHP XLite::getInstallationLng怎麽用?PHP XLite::getInstallationLng使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在XLite的用法示例。


在下文中一共展示了XLite::getInstallationLng方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getRequestCommonData

 /**
  * Common data for all request types
  *
  * @return array
  */
 protected function getRequestCommonData()
 {
     $data = array(static::FIELD_VERSION_API => static::MP_API_VERSION, static::FIELD_SHOP_ID => $this->generateShopID(), static::FIELD_SHOP_DOMAIN => \Includes\Utils\ConfigParser::getOptions(array('host_details', 'http_host')), static::FIELD_SHOP_URL => \XLite\Core\URLManager::getShopURL(), static::FIELD_VERSION_CORE_CURRENT => $this->getVersionField(\XLite::getInstance()->getMajorVersion(), \XLite::getInstance()->getMinorVersion()), static::FIELD_XCN_LICENSE_KEY => \XLite::getXCNLicenseKey(), static::FIELD_INSTALLATION_LNG => \XLite::getInstallationLng());
     return $data;
 }
開發者ID:kewaunited,項目名稱:xcart,代碼行數:10,代碼來源:Marketplace.php

示例2: getBlogUrl

 /**
  * Return Blog Url
  *
  * @return string
  */
 protected function getBlogUrl()
 {
     return \XLite::getInstallationLng() === 'ru' ? 'http://www.x-cart.ru/blog' : 'http://blog.x-cart.com';
 }
開發者ID:kirkbauer2,項目名稱:kirkxc,代碼行數:9,代碼來源:RSS.php

示例3: getPhrase

 /**
  * Get a Powered By phrase
  *
  * @return string
  */
 protected function getPhrase()
 {
     $phrase = static::PHRASE;
     $installationLng = \XLite::getInstallationLng();
     $currentPhrases = $installationLng && isset($this->phrases[$installationLng]) ? $this->phrases[$installationLng] : $this->phrases['en'];
     if (isset($currentPhrases) && is_array($currentPhrases) && 0 < count($currentPhrases)) {
         if (!isset(\XLite\Core\Config::getInstance()->Internal->prnotice_index) || !isset($currentPhrases[\XLite\Core\Config::getInstance()->Internal->prnotice_index])) {
             $index = mt_rand(0, count($currentPhrases) - 1);
             \XLite\Core\Database::getRepo('\\XLite\\Model\\Config')->createOption(array('category' => 'Internal', 'name' => 'prnotice_index', 'value' => $index));
         } else {
             $index = intval(\XLite\Core\Config::getInstance()->Internal->prnotice_index);
         }
         $tmp = $currentPhrases[$index];
         if (is_string($tmp) && 0 < strlen(trim($tmp))) {
             $phrase = $tmp;
         }
     }
     return $phrase;
 }
開發者ID:kirkbauer2,項目名稱:kirkxc,代碼行數:24,代碼來源:PoweredBy.php


注:本文中的XLite::getInstallationLng方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。