CoreFiles by mySites.guru
provider.php48 lines, 1,317 bytes, from Joomla_5.4.0-Stable-Full_Package.zip
Raw History Compare with 5.3.4
md5
5120c5c71fd8df6e79658cf4eeb5872f
sha1
17aac9ca8d66eae6f625f37d334a9c314f98200f
sha256
f410dd655a60466e5a07d62ff8f1d2238ef737fdeff5fb5f4ccbb604e5c3c003
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Quickicon.eos
 *
 * @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\Database\DatabaseInterface;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Plugin\Quickicon\Eos\Extension\Eos;

return new class () implements ServiceProviderInterface {
    /**
     * Registers the service provider with a DI container.
     *
     * @param   Container  $container  The DI container.
     *
     * @return  void
     *
     * @since  4.4.0
     *
     * @throws Exception
     */
    public function register(Container $container): void
    {
        $container->set(
            PluginInterface::class,
            function (Container $container) {
                $plugin     = new Eos(
                    (array) PluginHelper::getPlugin('quickicon', 'eos')
                );
                $plugin->setApplication(Factory::getApplication());
                $plugin->setDatabase($container->get(DatabaseInterface::class));

                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.