- md5
- f0dde8bd441c1aac7a4852f4463cec90
- sha1
- 8c6209ffa8e3a820db27244de1a09400685b84c4
- sha256
- 6073f5859eff0308f2eeee7d51b71fc9615aeae31f2a109a82dfcf5357d62c0e
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
<?php
/**
* @package Joomla.Administrator
* @subpackage com_finder
*
* @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\Component\Finder\Administrator\Extension;
use Joomla\CMS\Component\Router\RouterServiceInterface;
use Joomla\CMS\Component\Router\RouterServiceTrait;
use Joomla\CMS\Extension\BootableExtensionInterface;
use Joomla\CMS\Extension\MVCComponent;
use Joomla\CMS\HTML\HTMLRegistryAwareTrait;
use Joomla\Component\Finder\Administrator\Service\HTML\Filter;
use Joomla\Component\Finder\Administrator\Service\HTML\Finder;
use Joomla\Component\Finder\Administrator\Service\HTML\Query;
use Joomla\Database\DatabaseInterface;
use Psr\Container\ContainerInterface;
// phpcs:disable PSR1.Files.SideEffects
\defined('JPATH_PLATFORM') or die;
// phpcs:enable PSR1.Files.SideEffects
/**
* Component class for com_finder
*
* @since 4.0.0
*/
class FinderComponent extends MVCComponent implements BootableExtensionInterface, RouterServiceInterface
{
use RouterServiceTrait;
use HTMLRegistryAwareTrait;
/**
* Booting the extension. This is the function to set up the environment of the extension like
* registering new class loaders, etc.
*
* If required, some initial set up can be done from services of the container, eg.
* registering HTML services.
*
* @param ContainerInterface $container The container
*
* @return void
*
* @since 4.0.0
*/
public function boot(ContainerInterface $container)
{
$finder = new Finder();
$finder->setDatabase($container->get(DatabaseInterface::class));
$this->getRegistry()->register('finder', $finder);
$filter = new Filter();
$filter->setDatabase($container->get(DatabaseInterface::class));
$this->getRegistry()->register('filter', $filter);
$this->getRegistry()->register('query', new Query());
}
}
The same content is in 70 releases, Joomla 4.2.1 to 4.4.14. See them all, or every version of this file.