Пример #1
0
 /**
  * @brief load the user plugins
  * 
  * This loads up plugins that are installed and active but not part of 
  * the core.
  * 
  * @access public
  * 
  * @return void 
  */
 public static function loadInstalled()
 {
     $object = new StdClass();
     foreach ((array) self::listPlugins('notLoaded') as $plugin) {
         self::load($plugin);
         EventCore::trigger($object, $plugin . '.requireLibs');
         configureCache(EventCore::trigger($object, $plugin . '.setupCache'));
         EventCore::loadEventHandler($plugin);
     }
 }
Пример #2
0
 * Event to get the values from all the plugins and cache them
 */
$cachedConfigs = Cache::read('global_configs');
if (!empty($cachedConfigs)) {
    foreach ($cachedConfigs as $k => $v) {
        Configure::write($k, $v);
    }
}
unset($cacheEngine, $cachedConfigs);
InfinitasPlugin::loadCore();
EventCore::trigger(new StdClass(), 'requireLibs');
/**
 * @todo cake2.0
 * Cache::write('global_configs', Configure::getInstance());
 */
configureCache(EventCore::trigger(new StdClass(), 'setupCache'));
InfinitasPlugin::loadInstalled();
/**
 * Make sure the json defines are loaded.
 */
if (!defined('JSON_ERROR_NONE')) {
    define('JSON_ERROR_NONE', 0);
}
if (!defined('JSON_ERROR_DEPTH')) {
    define('JSON_ERROR_DEPTH', 1);
}
if (!defined('JSON_ERROR_CTRL_CHAR')) {
    define('JSON_ERROR_CTRL_CHAR', 3);
}
if (!defined('JSON_ERROR_SYNTAX')) {
    define('JSON_ERROR_SYNTAX', 4);