CoreFiles by mySites.guru
provider.php45 lines, 1,229 bytes, from Joomla_6.2.0-Stable-Full_Package.zip
Raw History Compare with 6.1.4
md5
9243c9c609e73e09ec5f5d6375a443e1
sha1
b15c0862c9b31d0fdd4241ace134d21ba8964bf3
sha256
d4aaad488e3c1d5642c12b7c997df0234462e21df69a983c292290510de4cbc0
<?php

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

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

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