| Current Path : /home/w/u/e/wuectly/www/03cbe/ |
| Current File : /home/w/u/e/wuectly/www/03cbe/provider.php.tar |
home/wuectly/www/libraries/fof/config/provider.php 0000604 00000011421 15245551535 0016357 0 ustar 00 <?php
/**
* @package FrameworkOnFramework
* @subpackage config
* @copyright Copyright (C) 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. All rights reserved.
* @license GNU General Public License version 2, or later
* @note This file has been modified by the Joomla! Project and no longer reflects the original work of its author.
*/
defined('FOF_INCLUDED') or die();
/**
* Reads and parses the fof.xml file in the back-end of a FOF-powered component,
* provisioning the data to the rest of the FOF framework
*
* @package FrameworkOnFramework
* @since 2.1
*/
class FOFConfigProvider
{
/**
* Cache of FOF components' configuration variables
*
* @var array
*/
public static $configurations = array();
/**
* Parses the configuration of the specified component
*
* @param string $component The name of the component, e.g. com_foobar
* @param boolean $force Force reload even if it's already parsed?
*
* @return void
*/
public function parseComponent($component, $force = false)
{
if (!$force && isset(self::$configurations[$component]))
{
return;
}
if (FOFPlatform::getInstance()->isCli())
{
$order = array('cli', 'backend');
}
elseif (FOFPlatform::getInstance()->isBackend())
{
$order = array('backend');
}
else
{
$order = array('frontend');
}
$order[] = 'common';
$order = array_reverse($order);
self::$configurations[$component] = array();
foreach ($order as $area)
{
$config = $this->parseComponentArea($component, $area);
self::$configurations[$component] = array_merge_recursive(self::$configurations[$component], $config);
}
}
/**
* Returns the value of a variable. Variables use a dot notation, e.g.
* view.config.whatever where the first part is the domain, the rest of the
* parts specify the path to the variable.
*
* @param string $variable The variable name
* @param mixed $default The default value, or null if not specified
*
* @return mixed The value of the variable
*/
public function get($variable, $default = null)
{
static $domains = null;
if (is_null($domains))
{
$domains = $this->getDomains();
}
list($component, $domain, $var) = explode('.', $variable, 3);
if (!isset(self::$configurations[$component]))
{
$this->parseComponent($component);
}
if (!in_array($domain, $domains))
{
return $default;
}
$class = 'FOFConfigDomain' . ucfirst($domain);
$o = new $class;
return $o->get(self::$configurations[$component], $var, $default);
}
/**
* Parses the configuration options of a specific component area
*
* @param string $component Which component's configuration to parse
* @param string $area Which area to parse (frontend, backend, cli)
*
* @return array A hash array with the configuration data
*/
protected function parseComponentArea($component, $area)
{
// Initialise the return array
$ret = array();
// Get the folders of the component
$componentPaths = FOFPlatform::getInstance()->getComponentBaseDirs($component);
$filesystem = FOFPlatform::getInstance()->getIntegrationObject('filesystem');
// Check that the path exists
$path = $componentPaths['admin'];
$path = $filesystem->pathCheck($path);
if (!$filesystem->folderExists($path))
{
return $ret;
}
// Read the filename if it exists
$filename = $path . '/fof.xml';
if (!$filesystem->fileExists($filename))
{
return $ret;
}
$data = file_get_contents($filename);
// Load the XML data in a SimpleXMLElement object
$xml = simplexml_load_string($data);
if (!($xml instanceof SimpleXMLElement))
{
return $ret;
}
// Get this area's data
$areaData = $xml->xpath('//' . $area);
if (empty($areaData))
{
return $ret;
}
$xml = array_shift($areaData);
// Parse individual configuration domains
$domains = $this->getDomains();
foreach ($domains as $dom)
{
$class = 'FOFConfigDomain' . ucfirst($dom);
if (class_exists($class, true))
{
$o = new $class;
$o->parseDomain($xml, $ret);
}
}
// Finally, return the result
return $ret;
}
/**
* Gets a list of the available configuration domain adapters
*
* @return array A list of the available domains
*/
protected function getDomains()
{
static $domains = array();
if (empty($domains))
{
$filesystem = FOFPlatform::getInstance()->getIntegrationObject('filesystem');
$files = $filesystem->folderFiles(__DIR__ . '/domain', '.php');
if (!empty($files))
{
foreach ($files as $file)
{
$domain = basename($file, '.php');
if ($domain == 'interface')
{
continue;
}
$domain = preg_replace('/[^A-Za-z0-9]/', '', $domain);
$domains[] = $domain;
}
$domains = array_unique($domains);
}
}
return $domains;
}
}
home/wuectly/www/plugins/system/jce/services/provider.php 0000604 00000002530 15245556213 0017754 0 ustar 00 <?php
/**
* @package JCE
* @subpackage System.Jce
*
* @copyright Copyright (C) 2005 - 2023 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (c) 2009-2023 Ryan Demmer. All rights reserved
* @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\System\Jce\Extension\Jce;
return new class() implements ServiceProviderInterface
{
/**
* Registers the service provider with a DI container.
*
* @param Container $container The DI container.
*
* @return void
*
* @since 3.0.0
*/
public function register(Container $container)
{
$container->set(
PluginInterface::class,
function (Container $container) {
$dispatcher = $container->get(DispatcherInterface::class);
$plugin = new Jce(
$dispatcher,
(array) PluginHelper::getPlugin('system', 'Jce')
);
$plugin->setApplication(Factory::getApplication());
return $plugin;
}
);
}
};
home/wuectly/www/libraries/f0f/config/provider.php 0000604 00000011232 15245603130 0016245 0 ustar 00 <?php
/**
* @package FrameworkOnFramework
* @subpackage config
* @copyright Copyright (C) 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. All rights reserved.
* @license GNU General Public License version 2, or later
*/
defined('F0F_INCLUDED') or die();
/**
* Reads and parses the fof.xml file in the back-end of a F0F-powered component,
* provisioning the data to the rest of the F0F framework
*
* @package FrameworkOnFramework
* @since 2.1
*/
class F0FConfigProvider
{
/**
* Cache of F0F components' configuration variables
*
* @var array
*/
public static $configurations = array();
/**
* Parses the configuration of the specified component
*
* @param string $component The name of the component, e.g. com_foobar
* @param boolean $force Force reload even if it's already parsed?
*
* @return void
*/
public function parseComponent($component, $force = false)
{
if (!$force && isset(self::$configurations[$component]))
{
return;
}
if (F0FPlatform::getInstance()->isCli())
{
$order = array('cli', 'backend');
}
elseif (F0FPlatform::getInstance()->isBackend())
{
$order = array('backend');
}
else
{
$order = array('frontend');
}
$order[] = 'common';
$order = array_reverse($order);
self::$configurations[$component] = array();
foreach ($order as $area)
{
$config = $this->parseComponentArea($component, $area);
self::$configurations[$component] = array_merge_recursive(self::$configurations[$component], $config);
}
}
/**
* Returns the value of a variable. Variables use a dot notation, e.g.
* view.config.whatever where the first part is the domain, the rest of the
* parts specify the path to the variable.
*
* @param string $variable The variable name
* @param mixed $default The default value, or null if not specified
*
* @return mixed The value of the variable
*/
public function get($variable, $default = null)
{
static $domains = null;
if (is_null($domains))
{
$domains = $this->getDomains();
}
list($component, $domain, $var) = explode('.', $variable, 3);
if (!isset(self::$configurations[$component]))
{
$this->parseComponent($component);
}
if (!in_array($domain, $domains))
{
return $default;
}
$class = 'F0FConfigDomain' . ucfirst($domain);
$o = new $class;
return $o->get(self::$configurations[$component], $var, $default);
}
/**
* Parses the configuration options of a specific component area
*
* @param string $component Which component's cionfiguration to parse
* @param string $area Which area to parse (frontend, backend, cli)
*
* @return array A hash array with the configuration data
*/
protected function parseComponentArea($component, $area)
{
// Initialise the return array
$ret = array();
// Get the folders of the component
$componentPaths = F0FPlatform::getInstance()->getComponentBaseDirs($component);
$filesystem = F0FPlatform::getInstance()->getIntegrationObject('filesystem');
// Check that the path exists
$path = $componentPaths['admin'];
$path = $filesystem->pathCheck($path);
if (!$filesystem->folderExists($path))
{
return $ret;
}
// Read the filename if it exists
$filename = $path . '/fof.xml';
if (!$filesystem->fileExists($filename))
{
return $ret;
}
$data = file_get_contents($filename);
// Load the XML data in a SimpleXMLElement object
$xml = simplexml_load_string($data);
if (!($xml instanceof SimpleXMLElement))
{
return $ret;
}
// Get this area's data
$areaData = $xml->xpath('//' . $area);
if (empty($areaData))
{
return $ret;
}
$xml = array_shift($areaData);
// Parse individual configuration domains
$domains = $this->getDomains();
foreach ($domains as $dom)
{
$class = 'F0FConfigDomain' . ucfirst($dom);
if (class_exists($class, true))
{
$o = new $class;
$o->parseDomain($xml, $ret);
}
}
// Finally, return the result
return $ret;
}
/**
* Gets a list of the available configuration domain adapters
*
* @return array A list of the available domains
*/
protected function getDomains()
{
static $domains = array();
if (empty($domains))
{
$filesystem = F0FPlatform::getInstance()->getIntegrationObject('filesystem');
$files = $filesystem->folderFiles(__DIR__ . '/domain', '.php');
if (!empty($files))
{
foreach ($files as $file)
{
$domain = basename($file, '.php');
if ($domain == 'interface')
{
continue;
}
$domain = preg_replace('/[^A-Za-z0-9]/', '', $domain);
$domains[] = $domain;
}
$domains = array_unique($domains);
}
}
return $domains;
}
}
home/wuectly/www/plugins/console/services/provider.php 0000604 00000002350 15245603174 0017330 0 ustar 00 <?php
/**
* @package akeebabackup
* @copyright Copyright (c)2006-2020 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 3, or later
*/
defined('_JEXEC') || die;
use Joomla\CMS\Extension\PluginInterface;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\Plugin\Console\AkeebaBackup\Extension\AkeebaBackup;
return new class implements ServiceProviderInterface {
/**
* Registers the service provider with a DI container.
*
* @param Container $container The DI container.
*
* @return void
*
* @since 4.0.0
*/
public function register(Container $container)
{
// Make sure that Joomla has registered the namespace for the plugin
if (!class_exists('\Joomla\Plugin\Console\AkeebaBackup\Extension\AkeebaBackup'))
{
JLoader::registerNamespace('\Joomla\Plugin\Console\AkeebaBackup', realpath(__DIR__ . '/../src'));
}
$container->set(
PluginInterface::class,
function (Container $container) {
$plugin = \Joomla\CMS\Plugin\PluginHelper::getPlugin('console', 'akeebabackup');
$subject = $container->get(DispatcherInterface::class);
return new AkeebaBackup($subject, (array) $plugin);
}
);
}
};
home/wuectly/www/plugins/fields/mediajce/services/provider.php 0000604 00000002554 15245617117 0020705 0 ustar 00 <?php
/**
* @package Joomla.Plugin
* @subpackage Fields.mediajce
*
* @copyright (C) 2023 Open Source Matters, Inc. <https://www.joomla.org>
* @copyright (C) 2020 - 2024 Ryan Demmer. All rights reserved.
* @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\Fields\MediaJce\Extension\MediaJce;
return new class () implements ServiceProviderInterface {
/**
* Registers the service provider with a DI container.
*
* @param Container $container The DI container.
*
* @return void
*
* @since 4.3.0
*/
public function register(Container $container)
{
$container->set(
PluginInterface::class,
function (Container $container) {
$dispatcher = $container->get(DispatcherInterface::class);
$plugin = new MediaJce(
$dispatcher,
(array) PluginHelper::getPlugin('fields', 'mediajce')
);
$plugin->setApplication(Factory::getApplication());
return $plugin;
}
);
}
};
home/wuectly/www/plugins/editors/jce/services/provider.php 0000604 00000002532 15245630204 0020074 0 ustar 00 <?php
/**
* @package JCE
* @subpackage System.Jce
*
* @copyright Copyright (C) 2005 - 2023 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (c) 2009-2023 Ryan Demmer. All rights reserved
* @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\Editors\Jce\Extension\Jce;
return new class() implements ServiceProviderInterface
{
/**
* Registers the service provider with a DI container.
*
* @param Container $container The DI container.
*
* @return void
*
* @since 3.0.0
*/
public function register(Container $container)
{
$container->set(
PluginInterface::class,
function (Container $container) {
$dispatcher = $container->get(DispatcherInterface::class);
$plugin = new Jce(
$dispatcher,
(array) PluginHelper::getPlugin('editors', 'jce')
);
$plugin->setApplication(Factory::getApplication());
return $plugin;
}
);
}
};
home/wuectly/www/plugins/installer/jce/services/provider.php 0000604 00000002372 15245630504 0020425 0 ustar 00 <?php
/**
* @package JCE
* @subpackage Installer.Jce
*
* @copyright Copyright (C) 2005 - 2023 Open Source Matters, Inc. All rights reserved
* @copyright Copyright (C) 2023 - 2024 Ryan Demmer. All rights reserved
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
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\Event\DispatcherInterface;
use Joomla\Plugin\Installer\Jce\Extension\Jce;
return new class() implements ServiceProviderInterface
{
public function register(Container $container)
{
$container->set(
PluginInterface::class,
function (Container $container) {
$dispatcher = $container->get(DispatcherInterface::class);
$plugin = new Jce(
$dispatcher,
(array) PluginHelper::getPlugin('installer', 'jce')
);
$plugin->setApplication(Factory::getApplication());
$plugin->setDatabase($container->get(DatabaseInterface::class));
return $plugin;
}
);
}
};