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


PHP CKunenaConfig::load方法代碼示例

本文整理匯總了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;
 }
開發者ID:JKoelman,項目名稱:JEM-3,代碼行數:40,代碼來源:event.php

示例2: CKunenaConfig

	public function &getInstance() {
		static $instance = NULL;
		if (! $instance) {
			$instance = new CKunenaConfig ();
			$instance->load ();
		}
		return $instance;
	}
開發者ID:rich20,項目名稱:Kunena,代碼行數:8,代碼來源:kunena.config.class.php


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