Back to LegacyFactory class

Method createController

public \Joomla\CMS\MVC\Controller\ControllerInterface
createController
(mixed $name, mixed $prefix, array $config, \Joomla\CMS\Application\CMSApplicationInterface $app, \Joomla\Input\Input $input)
Method to load and return a controller object.
Parameters
  • string $name The name of the controller
  • string $prefix The controller prefix
  • array $config The configuration array for the controller
  • \Joomla\CMS\Application\CMSApplicationInterface $app The app
  • \Joomla\Input\Input $input The input
Returns
  • \Joomla\CMS\MVC\Controller\ControllerInterface
Since
  • 4.0.0
-
  • \Exception
Class: LegacyFactory
Project: Joomla

Method createController - Source code

/**
 * Method to load and return a controller object.
 *
 * @param   string                   $name    The name of the controller
 * @param   string                   $prefix  The controller prefix
 * @param   array                    $config  The configuration array for the controller
 * @param   CMSApplicationInterface  $app     The app
 * @param   Input                    $input   The input
 *
 * @return  \Joomla\CMS\MVC\Controller\ControllerInterface
 *
 * @since   4.0.0
 * @throws  \Exception
 */
public function createController($name, $prefix, array $config, CMSApplicationInterface $app, Input $input)
{
    throw new \BadFunctionCallException('Legacy controller creation not supported.');
}