CoreFiles by mySites.guru
provider.php44 lines, 1,234 bytes, from Joomla_6.1.3-Stable-Full_Package.zip
Raw History Compare with 6.1.2
md5
e5ac734d8b3aec756a06f4d80e4e34e8
sha1
9671436a36d969084564d0a4a49dca07f94d271c
sha256
e8f3111eb8c3ccb1f44da7bd83519e13b4122d0426976935f743c372c0d72697
<?php

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

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