- md5
- ca08049a1d34ff430beedf9e55b7ef03
- sha1
- 90b8ef52963c265262247422bd2696222b81a068
- sha256
- 29ca47ebdbf575351355ef241969ccd2f7d22d9132b9ce76c4c0ed5297eaf56d
<?php
/**
* @package Joomla.Plugin
* @subpackage System.schemaorg
*
* @copyright (C) 2023 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
use Joomla\CMS\Extension\PluginInterface;
use Joomla\CMS\Factory;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\User\UserFactoryInterface;
use Joomla\Database\DatabaseInterface;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\Plugin\System\Schemaorg\Extension\Schemaorg;
return new class () implements ServiceProviderInterface {
/**
* Registers the service provider with a DI container.
*
* @param Container $container The DI container.
*
* @return void
*
* @since 5.0.0
*/
public function register(Container $container)
{
$container->set(
PluginInterface::class,
function (Container $container) {
$dispatcher = $container->get(DispatcherInterface::class);
$plugin = new Schemaorg(
$dispatcher,
(array) PluginHelper::getPlugin('system', 'schemaorg')
);
$plugin->setApplication(Factory::getApplication());
$plugin->setDatabase(Factory::getContainer()->get(DatabaseInterface::class));
$plugin->setUserFactory($container->get(UserFactoryInterface::class));
return $plugin;
}
);
}
};
The same content is in 15 releases, Joomla 5.0.0-rc to 5.1.0-alpha4. See them all, or every version of this file.