- md5
- 50d78f586db49d24a29a3e2a587fa6ff
- sha1
- 81807f038bb41ea1d947504d4ac875fb75fca72f
- sha256
- d58098c8768701ff65d84e050a745a88a0724e8534a108adbdbf2c82dd648615
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
<?php
/**
* Joomla! Content Management System
*
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\CMS\Extension;
use Joomla\CMS\Application\CMSApplicationInterface;
use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Dispatcher\DispatcherInterface;
// phpcs:disable PSR1.Files.SideEffects
\defined('JPATH_PLATFORM') or die;
// phpcs:enable PSR1.Files.SideEffects
/**
* Access to component specific services.
*
* @since 4.0.0
*/
class Component implements ComponentInterface
{
/**
* The dispatcher factory.
*
* @var ComponentDispatcherFactoryInterface
*
* @since 4.0.0
*/
private $dispatcherFactory;
/**
* Component constructor.
*
* @param ComponentDispatcherFactoryInterface $dispatcherFactory The dispatcher factory
*
* @since 4.0.0
*/
public function __construct(ComponentDispatcherFactoryInterface $dispatcherFactory)
{
$this->dispatcherFactory = $dispatcherFactory;
}
/**
* Returns the dispatcher for the given application.
*
* @param CMSApplicationInterface $application The application
*
* @return DispatcherInterface
*
* @since 4.0.0
*/
public function getDispatcher(CMSApplicationInterface $application): DispatcherInterface
{
return $this->dispatcherFactory->createDispatcher($application);
}
}
The same content is in 70 releases, Joomla 4.2.1 to 4.4.14. See them all, or every version of this file.