- md5
- d6e484ce6ec8cd3667b7d0097672c51e
- sha1
- b47b09a632c1769bd0a0456c6d6e6fc8d89c1c59
- sha256
- 575576cd169eec17e95f4733c3b07f2add30434ab35ab85d804d07c8970b71a7
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('_JEXEC') 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 155 releases, Joomla 5.0.0-alpha1 to 6.2.1-rc1. See them all, or every version of this file.