CoreFiles by mySites.guru
provider.php44 lines, 1,210 bytes, from Joomla_6.1.3-Stable-Full_Package.zip
Raw History Compare with 6.1.2
md5
15320c276d6bbb59e3ff5f0aca9a62fb
sha1
ef26a0f1c1a286c1ef9834ef16015afc232d6883
sha256
564e12ce68c1e903bd82122b99d126dc91c8d0574d87fcacbb80855aa24f71c7
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Schemaorg.article
 *
 * @copyright   (C) 2024 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\Article\Extension\Article;

return new class () implements ServiceProviderInterface {
    /**
     * Registers the service provider with a DI container.
     *
     * @param   Container  $container  The DI container.
     *
     * @return  void
     *
     * @since   5.1.0
     */
    public function register(Container $container)
    {
        $container->set(
            PluginInterface::class,
            $container->lazy(Article::class, function (Container $container) {
                $plugin = new Article(
                    (array) PluginHelper::getPlugin('schemaorg', 'article')
                );
                $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.