本文整理汇总了PHP中Mage_Core_Model_Website::getBaseSecureUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Website::getBaseSecureUrl方法的具体用法?PHP Mage_Core_Model_Website::getBaseSecureUrl怎么用?PHP Mage_Core_Model_Website::getBaseSecureUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Model_Website
的用法示例。
在下文中一共展示了Mage_Core_Model_Website::getBaseSecureUrl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _saveSystemConfig
/**
* Save system config resource model
*
* @param Enterprise_Staging_Model_Staging $staging
* @param Mage_Core_Model_Website $stagingWebsite
* @return Enterprise_Staging_Model_Staging_Adapter_Website
*/
protected function _saveSystemConfig($staging, Mage_Core_Model_Website $stagingWebsite, $entryPoint = null)
{
$masterWebsite = $staging->getMasterWebsite();
$unsecureBaseUrl = $stagingWebsite->getBaseUrl();
$secureBaseUrl = $stagingWebsite->getBaseSecureUrl();
if ($entryPoint && $entryPoint->isAutomatic()) {
$unsecureBaseUrl = $entryPoint->getBaseUrl($masterWebsite);
$secureBaseUrl = $entryPoint->getBaseUrl($masterWebsite, true);
}
$unsecureConf = Mage::getConfig()->getNode('default/web/unsecure');
$secureConf = Mage::getConfig()->getNode('default/web/secure');
if (!$masterWebsite->getIsStaging()) {
$originalBaseUrl = (string) $masterWebsite->getConfig("web/unsecure/base_url");
} else {
$originalBaseUrl = (string) Mage::getConfig()->getNode("default/web/unsecure/base_url");
}
$this->_saveUrlsInSystemConfig($stagingWebsite, $originalBaseUrl, $unsecureBaseUrl, 'unsecure', $unsecureConf);
if (strpos($secureBaseUrl, 'https') !== false) {
if (!$masterWebsite->getIsStaging()) {
$originalBaseUrl = (string) $masterWebsite->getConfig("web/secure/base_url");
} else {
$originalBaseUrl = (string) Mage::getConfig()->getNode("default/web/secure/base_url");
}
}
$this->_saveUrlsInSystemConfig($stagingWebsite, $originalBaseUrl, $secureBaseUrl, 'secure', $secureConf);
return $this;
}