Back to ApiDispatcher class

Method dispatch

public void
dispatch
()
Dispatch a controller task. API Overrides to ensure there is no redirects.
Returns
  • void
Since
  • 4.0.0
Class: ApiDispatcher
Project: Joomla

Method dispatch - Source code

/**
 * Dispatch a controller task. API Overrides to ensure there is no redirects.
 *
 * @return  void
 *
 * @since   4.0.0
 */
public function dispatch()
{
    $task = $this->input->getCmd('task', 'display');
    // Build controller config data
    $config['option'] = $this->option;
    // Set name of controller if it is passed in the request
    if ($this->input->exists('controller')) {
        $config['name'] = strtolower($this->input->get('controller'));
    }
    $controller = $this->input->get('controller');
    $controller = $this->getController($controller, ucfirst($this->app->getName()), $config);
    $controller->execute($task);
}