本文整理匯總了PHP中cssJSToolbox::modulesEngine方法的典型用法代碼示例。如果您正苦於以下問題:PHP cssJSToolbox::modulesEngine方法的具體用法?PHP cssJSToolbox::modulesEngine怎麽用?PHP cssJSToolbox::modulesEngine使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類cssJSToolbox
的用法示例。
在下文中一共展示了cssJSToolbox::modulesEngine方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: processSDModules
/**
* Process CJT Self delete modules only if there is modules
* available.
*
* Note: Modules can deleted them self after a while.
*
* The main concern is to avoid
* CJTModulesEngine or any other modules
* is resposible for setting cjt_process_modules value.
*
* @return void.
*/
private function processSDModules()
{
$modulesDirectory = 'modules';
$modulesListOptionName = MODULES_LIST_CACHE_VAR_PREFIX . "-{$modulesDirectory}";
$processModules = get_option($modulesListOptionName);
// IF processmodules is not array it means that this is the first time to run after
// the plugin installed and no list cached list, so give the modules engine the chance to collect the data.
// IF processModules is array but empty it means that modules deleted themself
// and no more modules to process.
if (!is_array($processModules) || is_array($processModules) && !empty($processModules)) {
// Process/Load modules.
require_once CJTOOLBOX_INCLUDE_PATH . '/modules.inc.php';
require_once CJTOOLBOX_INCLUDE_PATH . '/modulebase.inc.php';
self::$modulesEngine = CJTModulesEngine::getInstance($modulesDirectory);
self::$modulesEngine->processAll();
}
}