本文整理汇总了PHP中ipsRegistry::modules方法的典型用法代码示例。如果您正苦于以下问题:PHP ipsRegistry::modules方法的具体用法?PHP ipsRegistry::modules怎么用?PHP ipsRegistry::modules使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ipsRegistry
的用法示例。
在下文中一共展示了ipsRegistry::modules方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkCaches
/**
* Check caches
*
* @return @e void
* @author MattMecham
*/
protected function checkCaches()
{
//-----------------------------------------
// Check app cache data
//-----------------------------------------
# Apps
$app_cache = self::$handles['caches']->getCache('app_cache');
# Modules...
self::$modules = self::$handles['caches']->getCache('module_cache');
if (!count($app_cache) or !count(self::$modules)) {
self::$handles['caches']->rebuildCache('app_cache', 'global');
self::$handles['caches']->rebuildCache('module_cache', 'global');
$app_cache = self::$handles['caches']->getCache('app_cache');
self::$modules = self::$handles['caches']->getCache('module_cache');
}
//-----------------------------------------
// Build app data and APP specific load requests
//-----------------------------------------
foreach ($app_cache as $_app_dir => $_app_data) {
if (!IPS_IS_TASK and IPS_AREA == 'public' && !$_app_data['app_public_title']) {
continue;
}
$_app_data['app_public_title'] = $_app_data['app_public_title'] ? $_app_data['app_public_title'] : $_app_data['app_title'];
self::$applications[$_app_dir] = $_app_data;
}
/* Sort by position */
uasort(self::$applications, 'ipsRegistry::_appPositionSort');
# Modules by section...
foreach (self::$modules as $_app_dir => $_modules) {
foreach ($_modules as $_data) {
self::$modules_by_section[$_app_dir][$_data['sys_module_key']] = $_data;
}
}
//-----------------------------------------
// System vars and group
//-----------------------------------------
$systemvars_cache = self::$handles['caches']->getCache('systemvars');
if (!isset($systemvars_cache) or !isset($systemvars_cache['task_next_run'])) {
$update = array('task_next_run' => time());
$update['loadlimit'] = $systemvars_cache['loadlimit'] ? $systemvars_cache['loadlimit'] : 0;
$update['mail_queue'] = $systemvars_cache['mail_queue'] ? $systemvars_cache['mail_queue'] : 0;
$update['last_virus_check'] = $systemvars_cache['last_virus_check'] ? $systemvars_cache['last_virus_check'] : 0;
$update['last_deepscan_check'] = $systemvars_cache['last_deepscan_check'] ? $systemvars_cache['last_deepscan_check'] : 0;
self::$handles['caches']->setCache('systemvars', $update, array('donow' => 1, 'array' => 1));
}
$group_cache = self::$handles['caches']->getCache('group_cache');
if (!is_array($group_cache) or !count($group_cache)) {
$this->cache()->rebuildCache('group_cache', 'global');
}
//-----------------------------------------
// User agent caches
//-----------------------------------------
$useragent_cache = $this->cache()->getCache('useragents');
if (!is_array($useragent_cache) or !count($useragent_cache)) {
$this->cache()->rebuildCache('useragents', 'global');
}
//-----------------------------------------
// Output formats
//-----------------------------------------
$outputformats_cache = $this->cache()->getCache('outputformats');
if (!is_array($outputformats_cache) or !count($outputformats_cache)) {
$this->cache()->rebuildCache('outputformats', 'global');
}
//-----------------------------------------
// Hooks cache
//-----------------------------------------
if ($this->cache()->exists('hooks') !== TRUE) {
$this->cache()->rebuildCache('hooks', 'global');
}
//-----------------------------------------
// Version numbers
//-----------------------------------------
$version_numbers = $this->cache()->getCache('vnums');
if (!is_array($version_numbers) or !count($version_numbers)) {
$this->cache()->rebuildCache('vnums', 'global');
$version_numbers = $this->cache()->getCache('vnums');
}
/* Set them */
if (!defined('IPB_VERSION')) {
define('IPB_VERSION', $version_numbers['human']);
ipsRegistry::$version = IPB_VERSION;
}
if (!defined('IPB_LONG_VERSION')) {
define('IPB_LONG_VERSION', $version_numbers['long']);
ipsRegistry::$acpversion = IPB_LONG_VERSION;
ipsRegistry::$vn_full = IPB_LONG_VERSION;
}
//-----------------------------------------
// Any to rebuild?
//-----------------------------------------
if (count($this->cache()->fetchRebuildList())) {
foreach ($this->cache()->fetchRebuildList() as $_toRebuild) {
$this->cache()->rebuildCache($_toRebuild);
}
//.........这里部分代码省略.........