Work In Progress

This book is currently work in progress. Some sections are not yet written. Thank you for your understanding!

Getting the Dispatcher

The extension object is responsible for returning a number of interesting objects through its methods. These objects are meant to be used for interacting with the component. One of these is getDispatcher which lets us retrieve the component's Dispatcher object.

Your extension can have a custom dispatcher class, \My\Component\Example\Dispatcher\Dispatcher, where \My\Component\Example is your component's prefix. If this class exists, an object instance of it is returned.

If your extension does not have a dispatcher an instance of the default Joomla\CMS\Dispatcher\ComponentDispatcher (site and administrator applications) or Joomla\CMS\Dispatcher\ApiDispatcher (API application) will be created and returned instead.