本文整理汇总了PHP中Sobi::e方法的典型用法代码示例。如果您正苦于以下问题:PHP Sobi::e方法的具体用法?PHP Sobi::e怎么用?PHP Sobi::e使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sobi
的用法示例。
在下文中一共展示了Sobi::e方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getBasicCfg
/**
* Gets basic data from the CMS (e.g Joomla) and stores in the #SPConfig instance
*/
public function getBasicCfg()
{
$cfg = SPFactory::config();
$cfg->set('live_site', JURI::root());
$cfg->set('live_site_root', JURI::getInstance()->toString(array('scheme', 'host', 'port')));
$cfg->set('tmp_path', $this->JConfigValue('config.tmp_path'));
$cfg->set('from', $this->JConfigValue('config.mailfrom'), 'mail');
$cfg->set('mailer', $this->JConfigValue('config.mailer'), 'mail');
$cfg->set('fromname', $this->JConfigValue('config.fromname'), 'mail');
$cfg->set('smtpauth', $this->JConfigValue('config.smtpauth'), 'mail');
$cfg->set('smtphost', $this->JConfigValue('config.smtphost'), 'mail');
$cfg->set('smtpuser', $this->JConfigValue('config.smtpuser'), 'mail');
$cfg->set('smtppass', $this->JConfigValue('config.smtppass'), 'mail');
$cfg->set('smtpsecure', $this->JConfigValue('config.smtpsecure'), 'mail');
$cfg->set('smtpport', $this->JConfigValue('config.smtpport'), 'mail');
$cfg->set('unicode', $this->JConfigValue('unicodeslugs'), 'sef');
$lang = $this->JConfigValue('language');
if (!$lang) {
$lang = SPRequest::cmd('language');
}
$cfg->set('language', $lang);
$cfg->set('secret', $this->JConfigValue('secret'));
$cfg->set('site_name', $this->JConfigValue('config.sitename'));
$cfg->set('images_folder', SOBI_ROOT . '/media/sobipro/');
$cfg->set('img_folder_live', JURI::root() . '/media/sobipro');
$cfg->set('ftp_mode', $this->JConfigValue('config.ftp_enable'));
$cfg->set('time_offset', $this->JConfigValue('offset'));
$cfg->set('root_path', SOBI_PATH);
$cfg->set('cms_root_path', SOBI_ROOT);
$cfg->set('live_path', SOBI_LIVE_PATH);
if (defined('SOBIPRO_ADM')) {
$cfg->set('adm_img_folder_live', Sobi::FixPath(JURI::root() . '/' . SOBI_ADM_FOLDER . '/images'));
}
$cfg->set('img_folder_path', SOBI_ROOT . '/media/sobipro');
if ($this->JConfigValue('config.ftp_enable')) {
if (!file_exists($this->JConfigValue('config.tmp_path') . '/SobiPro')) {
if (!@mkdir($this->JConfigValue('config.tmp_path') . '/SobiPro')) {
JFolder::create($this->JConfigValue('config.tmp_path') . '/SobiPro', 0775);
}
}
$cfg->set('temp', $this->JConfigValue('config.tmp_path') . '/SobiPro', 'fs');
} else {
$cfg->set('temp', SOBI_PATH . '/tmp', 'fs');
}
// try mkdir because it's always used by apache
if (!Sobi::Cfg('cache.store', false)) {
if ($this->JConfigValue('config.ftp_enable')) {
if (!file_exists($this->JConfigValue('config.tmp_path') . '/SobiPro/Cache')) {
if (!mkdir($this->JConfigValue('config.tmp_path') . '/SobiPro/Cache')) {
// really ;)
if (!JFolder::create($this->JConfigValue('config.tmp_path') . '/SobiPro/Cache', 0775)) {
SPFactory::message()->setSilentSystemMessage(Sobi::e('CANNOT_CREATE_CACHE_DIRECTORY'), SPC::ERROR_MSG);
}
}
}
$cfg->set('store', $this->JConfigValue('config.tmp_path') . '/SobiPro/Cache/');
}
}
// Mon, Jun 29, 2015 10:52:09 - compat mode
if ($cfg->get('template.icon_fonts_arr', -1) == -1) {
$cfg->set('icon_fonts_arr', array('font-awesome-local'), 'template');
}
if (!is_array($cfg->get('template.icon_fonts_arr', -1))) {
$cfg->change('icon_fonts_arr', array($cfg->get('template.icon_fonts_arr', -1)), 'template');
}
}