CoreFiles by mySites.guru
provider.php46 lines, 1,292 bytes, from Joomla_5.2.3-Stable-Full_Package.zip
Raw History Compare with 5.2.2
md5
dc07326e605f25b32c74c325c8830f8c
sha1
cf8047e748409100cc3279d1c56b0641ec51c400
sha256
4c12f1bbcc7fa92c08af215fc3acd732b75b565f6ef2cdbfc8ab573c9671fb2e
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Media-Action.rotate
 *
 * @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\Event\DispatcherInterface;
use Joomla\Plugin\MediaAction\Rotate\Extension\Rotate;

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
     */
    public function register(Container $container): void
    {
        $container->set(
            PluginInterface::class,
            function (Container $container) {
                $plugin     = new Rotate(
                    $container->get(DispatcherInterface::class),
                    (array) PluginHelper::getPlugin('media-action', 'rotate')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            }
        );
    }
};

The same content is in 77 releases, Joomla 5.0.0-rc to 6.0.0-beta1. See them all, or every version of this file.