CoreFiles by mySites.guru
provider.php45 lines, 1,205 bytes, from Joomla_6.2.0-Stable-Full_Package.zip
Raw History Compare with 6.1.4
md5
e2dbcc8cf71d847d6178d1223b711f07
sha1
6ad403b3bf16681805867809384fe33f8a62d6ef
sha256
318f0b51cc77b8ca9d3a6b6bc2d61e4ae6b7bd68406b430e0fe66c9f078f8d77
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Schemaorg.person
 *
 * @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\Plugin\Schemaorg\Person\Extension\Person;

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,
            $container->lazy(Person::class, function (Container $container) {
                $plugin = new Person(
                    (array) PluginHelper::getPlugin('schemaorg', 'person')
                );

                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            })
        );
    }
};

The same content is in 28 releases, Joomla 6.1.0-beta1 to 6.2.1-rc1. See them all, or every version of this file.