CoreFiles by mySites.guru
provider.php45 lines, 1,205 bytes, from Joomla_6.1.2-Stable-Full_Package.zip
Raw History Compare with 6.1.1
md5
5f60eee20c69e41cb94b00cabbfbcd5d
sha1
e768b8d4482cebebeda1bb2ecbf142dbf3ac4328
sha256
318e3ee3e8bcb8865a6f35667c1db3bcaf569f98a08ccc89dfa63ccc612aea72
<?php

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

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

                $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.