我正在努力理解如何从 joomla 组件调用子控制器。控制器文件夹中要放置什么?
我有我的组件的入口点,例如-
<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// require helper file
JLoader::register('TieraerzteHelper', dirname(__FILE__) . DS . 'helpers' . DS . 'my_helper.php');
// import joomla controller library
jimport('joomla.application.component.controller');
$controller = JController::getInstance('MyController');
// Get the task
$jinput = JFactory::getApplication()->input;
$task = $jinput->get('task', "", 'STR' );
// Perform the Request task
$controller->execute($task);
// Redirect if set by the controller
$controller->redirect();
那么如果我想调用一个控制器,它放在控制器文件夹中,我该怎么做呢?