本文整理汇总了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();
}
}