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


PHP ipsRegistry::_fetchAppCoreVariables方法代码示例

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


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

示例1: rebuildCache

 /**
  * Rebuild a cache
  *
  * @access	public
  * @param	string	Cache key
  * @param	string	Application
  * @return	@e void
  */
 public static function rebuildCache($key, $app = '')
 {
     /* INIT */
     $app = IPSText::alphanumericalClean($app);
     $_caches = array();
     if ($app) {
         if ($app == 'global') {
             $_caches = ipsRegistry::_fetchCoreVariables('cache');
         } else {
             /* isset there is needed to prevent issues on applications installation */
             if (isset(ipsRegistry::$applications[$app]) && !IPSLib::appIsInstalled($app)) {
                 return;
             }
             $_caches = ipsRegistry::_fetchAppCoreVariables($app, 'cache');
         }
     } else {
         /* Get all caches from all apps */
         $_caches = ipsRegistry::_fetchCoreVariables('cache');
         foreach (ipsRegistry::$applications as $appDir => $appData) {
             $CACHE = ipsRegistry::_fetchAppCoreVariables($appDir, 'cache');
             if (is_array($CACHE)) {
                 $_caches = array_merge($_caches, $CACHE);
             }
         }
     }
     /* Rebuild the cache, if found */
     if (isset($_caches[$key])) {
         $file_to_check = $_caches[$key]['recache_file'];
         if ($file_to_check and is_file($file_to_check)) {
             $_func = $_caches[$key]['recache_function'];
             /* Hackish way to check for action overloader */
             if (strpos($file_to_check, '/modules_') !== FALSE) {
                 $_class = IPSLib::loadActionOverloader($file_to_check, $_caches[$key]['recache_class']);
             } elseif ($app) {
                 $_class = IPSLib::loadLibrary($file_to_check, $_caches[$key]['recache_class'], $app == 'global' ? 'core' : $app);
             }
             /* Fallback */
             if (!$_class) {
                 $_class = $_caches[$key]['recache_class'];
             }
             $recache = new $_class(ipsRegistry::instance());
             if (method_exists($recache, 'makeRegistryShortcuts')) {
                 $recache->makeRegistryShortcuts(ipsRegistry::instance());
             }
             $recache->{$_func}();
         }
     }
 }
开发者ID:ConnorChristie,项目名称:GrabViews-Live,代码行数:56,代码来源:ipsRegistry_setup.php

示例2: rebuildCache

 /**
  * Rebuild a cache using defined $CACHE settings in it's extensions file
  *
  * @param	string	Cache key
  * @param	string	Application
  * @return	@e void
  */
 public static function rebuildCache($key, $app = '')
 {
     if (defined('IPS_NO_CACHE_REBUILD')) {
         return true;
     }
     /* INIT */
     $app = IPSText::alphanumericalClean($app);
     $_caches = array();
     if ($app) {
         if ($app == 'global') {
             $_caches = ipsRegistry::_fetchCoreVariables('cache');
         } else {
             /* isset there is needed to prevent issues on applications installation */
             if (isset(ipsRegistry::$applications[$app]) && !IPSLib::appIsInstalled($app)) {
                 return;
             }
             $_caches = ipsRegistry::_fetchAppCoreVariables($app, 'cache');
         }
     } else {
         /* Get all caches from all apps */
         $_caches = ipsRegistry::_fetchCoreVariables('cache');
         foreach (ipsRegistry::$applications as $appDir => $appData) {
             $CACHE = ipsRegistry::_fetchAppCoreVariables($appDir, 'cache');
             if (is_array($CACHE)) {
                 $_caches = array_merge($_caches, $CACHE);
                 /* @link http://community.invisionpower.com/resources/bugs.html/_/ip-board/automatic-cache-reloads-do-not-take-application-directories-into-account-r41762 */
                 if (isset($CACHE[$key])) {
                     $app = $appDir;
                 }
             }
         }
     }
     /* Rebuild the cache, if found */
     if (isset($_caches[$key])) {
         $file_to_check = $_caches[$key]['recache_file'];
         if ($file_to_check and is_file($file_to_check)) {
             $_func = $_caches[$key]['recache_function'];
             /* Hackish way to check for action overloader */
             if (strpos($file_to_check, '/modules_') !== FALSE) {
                 $_class = IPSLib::loadActionOverloader($file_to_check, $_caches[$key]['recache_class']);
             } elseif ($app) {
                 $_class = IPSLib::loadLibrary($file_to_check, $_caches[$key]['recache_class'], $app == 'global' ? 'core' : $app);
             }
             /* Fallback */
             if (!$_class) {
                 $_class = $_caches[$key]['recache_class'];
             }
             $recache = new $_class(ipsRegistry::instance());
             if (method_exists($recache, 'makeRegistryShortcuts')) {
                 $recache->makeRegistryShortcuts(ipsRegistry::instance());
             }
             $recache->{$_func}();
         }
     }
 }
开发者ID:ConnorChristie,项目名称:GrabViews,代码行数:62,代码来源:ipsRegistry.php

示例3: rebuildCache

 /**
  * Rebuild a cache
  *
  * @access	public
  * @param	string	Cache key
  * @param	string	Application
  * @return	void
  */
 public static function rebuildCache($key, $app = '')
 {
     $app = IPSText::alphanumericalClean($app);
     if ($app) {
         if ($app == 'global') {
             $CACHE = ipsRegistry::_fetchCoreVariables('cache');
         } else {
             $CACHE = ipsRegistry::_fetchAppCoreVariables($app, 'cache');
         }
         if ($CACHE[$key]) {
             $file_to_check = $CACHE[$key]['recache_file'];
             if ($file_to_check and is_file($file_to_check) and file_exists($file_to_check)) {
                 $_class = $CACHE[$key]['recache_class'];
                 $_func = $CACHE[$key]['recache_function'];
                 require_once $file_to_check;
                 if (class_exists($_class)) {
                     $recache = new $_class(ipsRegistry::instance());
                     if (method_exists($recache, 'makeRegistryShortcuts')) {
                         $recache->makeRegistryShortcuts(ipsRegistry::instance());
                     }
                     $recache->{$_func}();
                 }
             }
         }
     } else {
         try {
             foreach (new DirectoryIterator(IPS_ROOT_PATH . 'applications') as $application) {
                 if ($application->isDir() and !$application->isDot()) {
                     $CACHE = ipsRegistry::_fetchAppCoreVariables(IPS_APP_COMPONENT, 'cache');
                     if (is_array($CACHE)) {
                         if ($CACHE[$key]) {
                             $file_to_check = $CACHE[$key]['recache_file'];
                             if ($file_to_check and file_exists($file_to_check)) {
                                 $_class = $CACHE[$key]['recache_class'];
                                 $_func = $CACHE[$key]['recache_function'];
                                 require_once $file_to_check;
                                 $recache = new $_class(ipsRegistry::instance());
                                 if (method_exists($recache, 'makeRegistryShortcuts')) {
                                     $recache->makeRegistryShortcuts(ipsRegistry::instance());
                                 }
                                 $recache->{$_func}();
                             }
                             break;
                         }
                     }
                 }
             }
         } catch (Exception $e) {
         }
     }
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:59,代码来源:ipsRegistry_setup.php


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