本文整理汇总了PHP中JemHelper::cleanup方法的典型用法代码示例。如果您正苦于以下问题:PHP JemHelper::cleanup方法的具体用法?PHP JemHelper::cleanup怎么用?PHP JemHelper::cleanup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JemHelper
的用法示例。
在下文中一共展示了JemHelper::cleanup方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: defined
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
defined('_JEXEC') or die;
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_jem')) {
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
JHtml::_('behavior.tabstate');
// Require classes
require_once JPATH_COMPONENT_SITE . '/helpers/helper.php';
require_once JPATH_COMPONENT_SITE . '/helpers/countries.php';
require_once JPATH_COMPONENT_SITE . '/classes/image.class.php';
require_once JPATH_COMPONENT_SITE . '/classes/output.class.php';
require_once JPATH_COMPONENT_SITE . '/classes/user.class.php';
require_once JPATH_COMPONENT_SITE . '/classes/attachment.class.php';
require_once JPATH_COMPONENT_SITE . '/classes/categories.class.php';
require_once JPATH_COMPONENT_ADMINISTRATOR . '/classes/admin.class.php';
require_once JPATH_COMPONENT_ADMINISTRATOR . '/helpers/helper.php';
// load recurrence files
JLoader::registerNamespace('Recurr', JPATH_COMPONENT_SITE . '/classes');
// Set the table directory
JTable::addIncludePath(JPATH_COMPONENT . '/tables');
// perform cleanup if it wasn't done today (archive, delete, recurrence)
JemHelper::cleanup();
// Get an instance of the controller
$controller = JControllerLegacy::getInstance('Jem');
// Perform the Request task
$input = JFactory::getApplication()->input;
$controller->execute($input->getCmd('task'));
// Redirect if set by the controller
$controller->redirect();