diff --git a/libraries/src/Dispatcher/ApiDispatcher.php b/libraries/src/Dispatcher/ApiDispatcher.php index e444c853a9430..9972c85ef641c 100644 --- a/libraries/src/Dispatcher/ApiDispatcher.php +++ b/libraries/src/Dispatcher/ApiDispatcher.php @@ -10,8 +10,6 @@ \defined('_JEXEC') or die; -use Joomla\CMS\Application\CMSApplication; - /** * API Implementation for our dispatcher. It loads a component's administrator language files, and calls the API * Controller so that components that haven't implemented web services can add their own handling. @@ -20,41 +18,6 @@ */ final class ApiDispatcher extends ComponentDispatcher { - /** - * The URL option for the component. - * - * @var string - * @since 1.6 - */ - protected $option; - - /** - * The extension namespace - * - * @var string - * - * @since 4.0.0 - */ - protected $namespace; - - /** - * The CmsApplication instance - * - * @var CMSApplication - * - * @since 4.0.0 - */ - protected $app; - - /** - * The JApplication instance - * - * @var \JInput - * - * @since 4.0.0 - */ - protected $input; - /** * Load the component's administrator language * @@ -71,7 +34,7 @@ protected function loadLanguage() } /** - * Dispatch a controller task. Redirecting the user if appropriate. + * Dispatch a controller task. API Overrides to ensure there is no redirects. * * @return void * diff --git a/libraries/src/Dispatcher/ComponentDispatcher.php b/libraries/src/Dispatcher/ComponentDispatcher.php index b46ee04fe9671..6366e7bf098f0 100644 --- a/libraries/src/Dispatcher/ComponentDispatcher.php +++ b/libraries/src/Dispatcher/ComponentDispatcher.php @@ -11,7 +11,7 @@ \defined('_JEXEC') or die; use Joomla\CMS\Access\Exception\NotAllowed; -use Joomla\CMS\Application\CMSApplication; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\Controller\BaseController; @@ -48,13 +48,13 @@ class ComponentDispatcher extends Dispatcher /** * Constructor for ComponentDispatcher * - * @param CMSApplication $app The application instance - * @param Input $input The input instance - * @param MVCFactoryInterface $mvcFactory The MVC factory instance + * @param CMSApplicationInterface $app The application instance + * @param Input $input The input instance + * @param MVCFactoryInterface $mvcFactory The MVC factory instance * * @since 4.0.0 */ - public function __construct(CMSApplication $app, Input $input, MVCFactoryInterface $mvcFactory) + public function __construct(CMSApplicationInterface $app, Input $input, MVCFactoryInterface $mvcFactory) { parent::__construct($app, $input); diff --git a/libraries/src/Dispatcher/Dispatcher.php b/libraries/src/Dispatcher/Dispatcher.php index 0500ec8acb86e..61f65c680332f 100644 --- a/libraries/src/Dispatcher/Dispatcher.php +++ b/libraries/src/Dispatcher/Dispatcher.php @@ -10,7 +10,7 @@ \defined('_JEXEC') or die; -use Joomla\CMS\Application\CMSApplication; +use Joomla\CMS\Application\CMSApplicationInterface; use Joomla\Input\Input; /** @@ -23,7 +23,7 @@ abstract class Dispatcher implements DispatcherInterface /** * The application instance * - * @var CMSApplication + * @var CMSApplicationInterface * @since 4.0.0 */ protected $app; @@ -39,12 +39,12 @@ abstract class Dispatcher implements DispatcherInterface /** * Constructor for Dispatcher * - * @param CMSApplication $app The application instance - * @param Input $input The input instance + * @param CMSApplicationInterface $app The application instance + * @param Input $input The input instance * * @since 4.0.0 */ - public function __construct(CMSApplication $app, Input $input) + public function __construct(CMSApplicationInterface $app, Input $input) { $this->app = $app; $this->input = $input; @@ -53,11 +53,11 @@ public function __construct(CMSApplication $app, Input $input) /** * The application the dispatcher is working with. * - * @return CMSApplication + * @return CMSApplicationInterface * * @since 4.0.0 */ - protected function getApplication(): CMSApplication + protected function getApplication(): CMSApplicationInterface { return $this->app; }