CoreFiles by mySites.guru
provider.php45 lines, 1,172 bytes, from Joomla_6.0.2-Stable-Full_Package.zip
Raw History Compare with 6.0.1
md5
40f0838d2bd612216465c2d4d3f30df5
sha1
dd6fa4daa553883646ca5909ffc43c02a88ee09b
sha256
9a3bec9cee3c29d59aeccd57f2777243746dfcd9a29067b4e457e33db87ce7b4
<?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,
            function (Container $container) {
                $plugin = new Person(
                    (array) PluginHelper::getPlugin('schemaorg', 'person')
                );

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

                return $plugin;
            }
        );
    }
};

The same content is in 43 releases, Joomla 5.4.0-beta2 to 6.1.0-alpha3. See them all, or every version of this file.