当前位置: 首页>>代码示例>>PHP>>正文


PHP Sh404sefFactory::getController方法代码示例

本文整理汇总了PHP中Sh404sefFactory::getController方法的典型用法代码示例。如果您正苦于以下问题:PHP Sh404sefFactory::getController方法的具体用法?PHP Sh404sefFactory::getController怎么用?PHP Sh404sefFactory::getController使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Sh404sefFactory的用法示例。


在下文中一共展示了Sh404sefFactory::getController方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: die

    die('Direct Access to this location is not allowed.');
}
// Ensure that user has access to this function.
$user =& JFactory::getUser();
if (!($user->usertype == 'Super Administrator' || $user->usertype == 'Administrator')) {
    $mainframe->redirect('index.php', JText::_('ALERTNOTAUTH'));
}
// Setup paths.
$sef_config_class = JPATH_ADMINISTRATOR . '/components/com_sh404sef/sh404sef.class.php';
$sef_config_file = JPATH_ADMINISTRATOR . '/components/com_sh404sef/config/config.sef.php';
// Make sure class was loaded.
if (!class_exists('shSEFConfig')) {
    if (is_readable($sef_config_class)) {
        require_once $sef_config_class;
    } else {
        JError::RaiseError(500, COM_SH404SEF_NOREAD . "( {$sef_config_class} )<br />" . COM_SH404SEF_CHK_PERMS);
    }
}
// testing JLanguage16
jimport('joomla.language.language');
$j16Language =& shjlang16Helper::getLanguage();
$loaded = $j16Language->load('com_sh404sef', JPATH_BASE);
// include sh404sef default language file
shIncludeLanguageFile();
// find about specific controller requested
$cName = JRequest::getCmd('c');
// get controller from factory
$controller = Sh404sefFactory::getController($cName);
// read and execute task
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();
开发者ID:sangkasi,项目名称:joomla,代码行数:31,代码来源:admin.sh404sef.php


注:本文中的Sh404sefFactory::getController方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。