| Current Path : /home/smartconb/www/armencom33/plugins/system/picasaupdater/services/ |
| Current File : /home/smartconb/www/armencom33/plugins/system/picasaupdater/services/provider.php |
<?php
/**
* @package Sven.Bluege
* @subpackage com_eventgallery
*
* @copyright Copyright (C) 2005 - 2019 Sven Bluege All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') || die;
use Joomla\CMS\Extension\PluginInterface;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Svenbluege\Plugin\Content\Eventgallery\Extension\Eventgallery;
use Svenbluege\Plugin\System\PicasaUpdater\Extension\PicasaUpdater;
return new class implements ServiceProviderInterface {
public function register(Container $container)
{
$container->set(
PluginInterface::class,
function (Container $container) {
$subject = $container->get(DispatcherInterface::class);
$config = (array)PluginHelper::getPlugin('system', 'picasaupdater');
$plugin = new PicasaUpdater($subject, $config);
$plugin->setApplication(\Joomla\CMS\Factory::getApplication());
$plugin->setDatabase($container->get('DatabaseDriver'));
$plugin->init();
return $plugin;
}
);
}
};