Since: 4.0.0

class ComponentDispatcher extends Dispatcher

Base class for a Joomla Component Dispatcher

Dispatchers are responsible for checking ACL of a component if appropriate and choosing an appropriate controller (and if necessary, a task) and executing it.

Properties

protected CMSApplicationInterface Since: 4.0.0
$app

The application instance

from  Dispatcher
protected Input Since: 4.0.0
$input

The input instance

from  Dispatcher
protected string Since: 4.0.0
$option

The URL option for the component.

protected MVCFactoryInterface Since: 4.0.0
$mvcFactory

The MVC factory

Methods

__construct(CMSApplicationInterface $app, Input $input, MVCFactoryInterface $mvcFactory)

Constructor for ComponentDispatcher

getApplication()

The application the dispatcher is working with.

void
loadLanguage()

Load the language

void
checkAccess()

Method to check component access permission

void
dispatch()

Dispatch a controller task. Redirecting the user if appropriate.

getController(string $name, string $client = '', array $config = [])

Get a controller from the component

Details

__construct(CMSApplicationInterface $app, Input $input, MVCFactoryInterface $mvcFactory)

Since: 4.0.0

Constructor for ComponentDispatcher

Parameters

CMSApplicationInterface $app

The application instance

Input $input

The input instance

MVCFactoryInterface $mvcFactory

The MVC factory instance

protected CMSApplicationInterface getApplication()

Since: 4.0.0

The application the dispatcher is working with.

protected void loadLanguage()

Since: 4.0.0

Load the language

Return Value

void

protected void checkAccess()

Since: 4.0.0

Method to check component access permission

Return Value

void

void dispatch()

Since: 4.0.0

Dispatch a controller task. Redirecting the user if appropriate.

Return Value

void

BaseController getController(string $name, string $client = '', array $config = [])

Since: 4.0.0

Get a controller from the component

Parameters

string $name

Controller name

string $client

Optional client (like Administrator, Site etc.)

array $config

Optional controller config

Return Value

BaseController