本文整理匯總了PHP中KunenaError::cleanup方法的典型用法代碼示例。如果您正苦於以下問題:PHP KunenaError::cleanup方法的具體用法?PHP KunenaError::cleanup怎麽用?PHP KunenaError::cleanup使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類KunenaError
的用法示例。
在下文中一共展示了KunenaError::cleanup方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: KunenaControllerInstall
if ($app->input->getCmd('view') == 'install' || !class_exists('KunenaForum') || !KunenaForum::isCompatible('4.0')) {
// Run installer instead..
require_once __DIR__ . '/install/controller.php';
$controller = new KunenaControllerInstall();
// TODO: execute special task that checks what's wrong
$controller->execute($app->input->getCmd('task'));
$controller->redirect();
return;
}
if ($app->input->getCmd('view') == 'uninstall') {
$allowed = $app->getUserState('com_kunena.uninstall.allowed');
if ($allowed) {
require_once __DIR__ . '/install/controller.php';
$controller = new KunenaControllerInstall();
$controller->execute('uninstall');
$controller->redirect();
$app->setUserState('com_kunena.uninstall.allowed', null);
return;
}
}
// Initialize Kunena Framework.
KunenaForum::setup();
// Initialize custom error handlers.
KunenaError::initialize();
// Kunena has been successfully installed: Load our main controller.
$controller = KunenaController::getInstance();
$controller->execute($app->input->getCmd('task'));
$controller->redirect();
// Remove custom error handlers.
KunenaError::cleanup();