CoreFiles by mySites.guru
provider.php47 lines, 1,350 bytes, from Joomla_5.0.0-beta2-Beta-Full_Package.zip
Raw History Compare with 5.0.0-beta1
md5
f4119c9d3b1351ff06ef4288bbcf4caf
sha1
d0c143a533999f48047a5a28427b53c51feac4b0
sha256
161ca3ac1d3622c18d4389d72cdbc4bafb0d65ea1363b4a5f9a378dddc06099b
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Schemaorg.organization
 *
 * @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\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\Plugin\Schemaorg\Organization\Extension\Organization;

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 Organization(
                    $dispatcher,
                    (array) PluginHelper::getPlugin('schemaorg', 'organization')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            }
        );
    }
};

The same content is in 5 releases, Joomla 5.0.0-alpha3 to 5.0.0-beta3. See them all, or every version of this file.