当前位置: 首页>>代码示例>>PHP>>正文


PHP KunenaAccess::instance方法代码示例

本文整理汇总了PHP中KunenaAccess::instance方法的典型用法代码示例。如果您正苦于以下问题:PHP KunenaAccess::instance方法的具体用法?PHP KunenaAccess::instance怎么用?PHP KunenaAccess::instance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KunenaAccess的用法示例。


在下文中一共展示了KunenaAccess::instance方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getInstance

	static public function getInstance($integration = null) {
		KUNENA_PROFILER ? KunenaProfiler::instance()->start('function '.__CLASS__.'::'.__FUNCTION__.'()') : null;
		if (self::$instance === false) {
			if (! $integration) {
				$integration = KunenaFactory::getConfig ()->integration_access;
			}
			self::$instance = KunenaIntegration::initialize ( 'access', $integration );

			// Load administrators and moderators
			$cache = JFactory::getCache('com_kunena', 'output');
			$data = $cache->get(self::$cacheKey, 'com_kunena');
			if ($data) {
				$data = unserialize($data);
				self::$adminsByCatid = (array)$data['ac'];
				self::$adminsByUserid = (array)$data['au'];
				self::$moderatorsByCatid = (array)$data['mc'];
				self::$moderatorsByUserid = (array)$data['mu'];
			}
			//$my = JFactory::getUser();
			// If values were not cached (or users permissions have been changed), force reload
			if (!$data) { // || ($my->id && $my->authorize('com_kunena', 'administrator') == empty(self::$adminsByUserid[$my->id][0]) )) {
				self::$instance->clearCache();
			}
		}
		KUNENA_PROFILER ? KunenaProfiler::instance()->stop('function '.__CLASS__.'::'.__FUNCTION__.'()') : null;
		return self::$instance;
	}
开发者ID:rich20,项目名称:Kunena,代码行数:27,代码来源:access.php

示例2: getInstance

	public static function getInstance() {
		KUNENA_PROFILER ? KunenaProfiler::instance()->start('function '.__CLASS__.'::'.__FUNCTION__.'()') : null;
		if (!self::$instance) {
			self::$instance = new KunenaAccess();
		}
		KUNENA_PROFILER ? KunenaProfiler::instance()->stop('function '.__CLASS__.'::'.__FUNCTION__.'()') : null;
		return self::$instance;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:8,代码来源:access.php

示例3: getInstance

 public static function getInstance($integration = null)
 {
     if (self::$instance === false) {
         $config = KunenaFactory::getConfig();
         if (!$integration) {
             $integration = $config->integration_access;
         }
         self::$instance = KunenaIntegration::initialize('access', $integration);
     }
     return self::$instance;
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:11,代码来源:access.php


注:本文中的KunenaAccess::instance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。