if ($val['active']) { $includes[] = DFPath('plugins.' . $key, $mainFile); } } foreach ($includes as $k) { include_once $k; } } public static function isPluginLoaded($pluginName) { return DSettings::$pluginList[$pluginName]['active']; } /** * Returns an array containing the plugin information * @param string $pluginName */ public static function getPluginInfo($pluginName) { return DSettings::$pluginList[$pluginName]; } public static function activatePlugin($pluginName) { DSettings::$pluginList[$pluginName]['active'] = true; } public static function deactivatePlugin($pluginName) { DSettings::$pluginList[$pluginName]['active'] = false; } } DMainPlugin::loadList();
*/ if (DMainPlugin::isPluginLoaded('cacheManager')) { cacheManager::startBuffer(); } /** * 5,4,3,2,1.... */ new main(); //off we go... /** * Closing the DBufferHandler(if its been enabled) * * @link http://not-ready See the Documentation on the DBufferHandler class * @link http://not-ready See the Documentation on the DSettings class */ if (DMainPlugin::isPluginLoaded('cacheManager')) { cacheManager::endBuffer(); } /** * <p>The main class can be likened to the main function in java and c++, this class * serves as the entry point for the framework. </p> * <p>The class is responsible for initiating needed classes and functionalities before passing * the control to the requested app through the app's view component</p> */ final class main { function __construct() { $this->init(); $this->connect(); }