本文整理匯總了PHP中CAppUI::getModuleClass方法的典型用法代碼示例。如果您正苦於以下問題:PHP CAppUI::getModuleClass方法的具體用法?PHP CAppUI::getModuleClass怎麽用?PHP CAppUI::getModuleClass使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CAppUI
的用法示例。
在下文中一共展示了CAppUI::getModuleClass方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: CAppUI
<?php
require_once 'base.php';
require_once DP_BASE_DIR . '/includes/config.php';
require_once DP_BASE_DIR . '/includes/main_functions.php';
require_once DP_BASE_DIR . '/includes/db_adodb.php';
require_once DP_BASE_DIR . '/includes/db_connect.php';
require_once DP_BASE_DIR . '/classes/ui.class.php';
$AppUI = new CAppUI();
/* cron tasks */
// project statistics
require_once $AppUI->getModuleClass('projects_statistics');
$ps =& new CProjectsStatistics('projects_statistics', 'projects_statistics_id');
$ps->createStatistics();
示例2: CAppUI
// Function to scan the event queue and execute any functions required.
require_once 'base.php';
require_once W2P_BASE_DIR . '/includes/config.php';
require_once W2P_BASE_DIR . '/includes/main_functions.php';
require_once W2P_BASE_DIR . '/includes/db_adodb.php';
$defaultTZ = w2PgetConfig('system_timezone', 'Europe/London');
date_default_timezone_set($defaultTZ);
$AppUI = new CAppUI();
$AppUI->setUserLocale();
$queue = new w2p_Core_EventQueue();
$queue->scan();
/*
This is the first piece of a simple hook system to allow for regularly
scheduled maintenance tasks to occur. This could be data validation and
cleanup, sending email notifications, or workflow related tasks.
The model for this functionality was based on Drupal's methods for laying
out and interacting with hooks. It should not be considered complete at
this time.
*/
$moduleList = $AppUI->getLoadableModuleList();
foreach ($moduleList as $module) {
if (!in_array($module['mod_main_class'], get_declared_classes())) {
require_once $AppUI->getModuleClass($module['mod_directory']);
}
$object = new $module['mod_main_class']();
if (is_callable(array($object, 'hook_cron'))) {
$object->hook_cron();
}
}