本文整理汇总了PHP中CKunenaConfig::load方法的典型用法代码示例。如果您正苦于以下问题:PHP CKunenaConfig::load方法的具体用法?PHP CKunenaConfig::load怎么用?PHP CKunenaConfig::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKunenaConfig
的用法示例。
在下文中一共展示了CKunenaConfig::load方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getKunenaConfig
function getKunenaConfig()
{
static $kconfig = false;
if ($kconfig === false) {
// Run only one time
$kconfig = null;
// Make sure that Kunena API (if exists) has been loaded
$api = JPATH_ADMINISTRATOR . '/components/com_kunena/api.php';
if (is_file($api)) {
require_once $api;
}
if (class_exists('KunenaFactory')) {
// Support for Kunena 1.6, 1.7 and 2.0
$kconfig = KunenaFactory::getConfig();
} elseif (is_file(JPATH_ROOT . '/components/com_kunena/lib/kunena.config.class.php')) {
// Support for Kunena 1.0 and 1.5
require_once JPATH_ROOT . '/components/com_kunena/lib/kunena.config.class.php';
// Next 4 lines are needed to make <1.0.9 and <1.5.2 to work
if (is_file(JPATH_ROOT . '/components/com_kunena/lib/kunena.debug.php')) {
require_once JPATH_ROOT . '/components/com_kunena/lib/kunena.debug.php';
}
if (is_file(JPATH_ROOT . '/components/com_kunena/lib/kunena.user.class.php')) {
require_once JPATH_ROOT . '/components/com_kunena/lib/kunena.user.class.php';
}
if (method_exists('CKunenaConfig', 'getInstance')) {
// Support for Kunena 1.0.9+ and 1.5
$kconfig = CKunenaConfig::getInstance();
} elseif (class_exists('CKunenaConfig')) {
// Support for Kunena 1.0.8
$kconfig = new CKunenaConfig();
$kconfig->load();
} elseif (class_exists('fb_Config')) {
// Support for Kunena 1.0.6RC2 and 1.0.7b
$kconfig = new fb_Config();
$kconfig->load();
}
}
}
return $kconfig;
}
示例2: CKunenaConfig
public function &getInstance() {
static $instance = NULL;
if (! $instance) {
$instance = new CKunenaConfig ();
$instance->load ();
}
return $instance;
}