File manager - Edit - /home/ferretapmx/public_html/Provider.tar
Back
Logger.php 0000644 00000002216 15231072141 0006471 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Service\Provider; use Joomla\CMS\Log\Log; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use Psr\Log\LoggerInterface; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Service provider for the application's PSR-3 logger dependency * * @since 4.0.0 */ class Logger 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) { $container->alias('logger', LoggerInterface::class) ->share( LoggerInterface::class, function (Container $container) { return Log::createDelegatedLogger(); }, true ); } } Toolbar.php 0000644 00000002622 15231072141 0006655 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Service\Provider; use Joomla\CMS\Toolbar\ContainerAwareToolbarFactory; use Joomla\CMS\Toolbar\ToolbarFactoryInterface; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Service provider for the application's toolbar dependency * * @since 4.0.0 */ class Toolbar 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) { $container->alias('toolbar.factory', ToolbarFactoryInterface::class) ->alias(ContainerAwareToolbarFactory::class, ToolbarFactoryInterface::class) ->share( ToolbarFactoryInterface::class, function (Container $container) { $factory = new ContainerAwareToolbarFactory(); $factory->setContainer($container); return $factory; }, true ); } } CacheController.php 0000644 00000002506 15231072141 0010323 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Service\Provider; use Joomla\CMS\Cache\CacheControllerFactory; use Joomla\CMS\Cache\CacheControllerFactoryInterface; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Service provider for the cache controller dependency * * @since 4.0.0 */ class CacheController 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) { $container->alias('cache.controller.factory', CacheControllerFactoryInterface::class) ->alias(CacheControllerFactory::class, CacheControllerFactoryInterface::class) ->share( CacheControllerFactoryInterface::class, function (Container $container) { return new CacheControllerFactory(); }, true ); } } Authentication.php 0000644 00000011503 15231072141 0010230 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Service\Provider; use Joomla\Authentication\Password\Argon2idHandler as BaseArgon2idHandler; use Joomla\Authentication\Password\Argon2iHandler as BaseArgon2iHandler; use Joomla\Authentication\Password\BCryptHandler as BaseBCryptHandler; use Joomla\CMS\Authentication\Password\Argon2idHandler; use Joomla\CMS\Authentication\Password\Argon2iHandler; use Joomla\CMS\Authentication\Password\BCryptHandler; use Joomla\CMS\Authentication\Password\ChainedHandler; use Joomla\CMS\Authentication\Password\MD5Handler; use Joomla\CMS\Authentication\Password\PHPassHandler; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Service provider for the authentication dependencies * * @since 4.0.0 */ class Authentication 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) { $container->alias('password.handler.argon2i', Argon2iHandler::class) ->alias(BaseArgon2iHandler::class, Argon2iHandler::class) ->share( Argon2iHandler::class, function (Container $container) { return new Argon2iHandler(); }, true ); $container->alias('password.handler.argon2id', Argon2idHandler::class) ->alias(BaseArgon2idHandler::class, Argon2idHandler::class) ->share( Argon2idHandler::class, function (Container $container) { return new Argon2idHandler(); }, true ); $container->alias('password.handler.chained', ChainedHandler::class) ->share( ChainedHandler::class, function (Container $container) { $handler = new ChainedHandler(); // Load the chain with supported core handlers $handler->addHandler($container->get(BCryptHandler::class)); if (Argon2iHandler::isSupported()) { $handler->addHandler($container->get(Argon2iHandler::class)); } if (Argon2idHandler::isSupported()) { $handler->addHandler($container->get(Argon2idHandler::class)); } $handler->addHandler($container->get(PHPassHandler::class)); $handler->addHandler($container->get(MD5Handler::class)); return $handler; }, true ); // The Joomla default is BCrypt so alias this service $container->alias('password.handler.default', BCryptHandler::class) ->alias(BaseBCryptHandler::class, BCryptHandler::class) ->alias('password.handler.bcrypt', BCryptHandler::class) ->share( BCryptHandler::class, function (Container $container) { return new BCryptHandler(); }, true ); $container->alias('password.handler.md5', MD5Handler::class) ->share( MD5Handler::class, function (Container $container) { @trigger_error( \sprintf( 'The "%1$s" class service is deprecated, use the "%2$s" service for the active password handler instead.', MD5Handler::class, 'password.handler.default' ), E_USER_DEPRECATED ); return new MD5Handler(); }, true ); $container->alias('password.handler.phpass', PHPassHandler::class) ->share( PHPassHandler::class, function (Container $container) { @trigger_error( \sprintf( 'The "%1$s" class service is deprecated, use the "%2$s" service for the active password handler instead.', PHPassHandler::class, 'password.handler.default' ), E_USER_DEPRECATED ); return new PHPassHandler(); }, true ); } } Session.php 0000644 00000031240 15231072141 0006674 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Service\Provider; use Joomla\CMS\Application\AdministratorApplication; use Joomla\CMS\Application\ConsoleApplication; use Joomla\CMS\Application\SiteApplication; use Joomla\CMS\Factory; use Joomla\CMS\Input\Input as CMSInput; use Joomla\CMS\Installation\Application\InstallationApplication; use Joomla\CMS\Session\EventListener\MetadataManagerListener; use Joomla\CMS\Session\MetadataManager; use Joomla\CMS\Session\SessionFactory; use Joomla\CMS\Session\SessionManager; use Joomla\CMS\Session\Storage\JoomlaStorage; use Joomla\Database\DatabaseInterface; use Joomla\DI\Container; use Joomla\DI\Exception\DependencyResolutionException; use Joomla\DI\ServiceProviderInterface; use Joomla\Event\DispatcherInterface; use Joomla\Event\LazyServiceEventListener; use Joomla\Registry\Registry; use Joomla\Session\HandlerInterface; use Joomla\Session\SessionEvents; use Joomla\Session\Storage\RuntimeStorage; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Service provider for the application's session dependency * * @since 4.0.0 */ class Session 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) { $container->share( 'session.web.administrator', function (Container $container) { /** @var Registry $config */ $config = $container->get('config'); $input = $container->get(CMSInput::class); // Generate a session name. $name = $this->generateSessionName($config, AdministratorApplication::class); // Calculate the session lifetime. $lifetime = $config->get('lifetime') ? $config->get('lifetime') * 60 : 900; // Initialize the options for the Session object. $options = [ 'name' => $name, 'expire' => $lifetime, ]; if ($config->get('force_ssl') >= 1) { $options['force_ssl'] = true; } $handler = $container->get('session.factory')->createSessionHandler($options); if (!$container->has('session.handler')) { $this->registerSessionHandlerAsService($container, $handler); } $options['cookie_domain'] = $config->get('cookie_domain', ''); $options['cookie_path'] = $config->get('cookie_path', '/'); return new \Joomla\CMS\Session\Session( new JoomlaStorage($input, $handler, $options), $container->get(DispatcherInterface::class), $options ); }, true ); $container->share( 'session.web.installation', function (Container $container) { /** @var Registry $config */ $config = $container->get('config'); $input = $container->get(CMSInput::class); /** * Session handler for the session is always filesystem so it doesn't flip to the database after * configuration.php has been written to */ $config->set('session_handler', 'filesystem'); /** * Generate a session name - unlike all the other apps we don't have either a secret or a session name * (that's not the app name) until we complete installation which then leads to us dropping things like * language preferences after installation as the app refreshes. */ $name = md5(serialize(JPATH_ROOT . InstallationApplication::class)); // Calculate the session lifetime. $lifetime = $config->get('lifetime') ? $config->get('lifetime') * 60 : 900; // Initialize the options for the Session object. $options = [ 'name' => $name, 'expire' => $lifetime, ]; $handler = $container->get('session.factory')->createSessionHandler($options); if (!$container->has('session.handler')) { $this->registerSessionHandlerAsService($container, $handler); } $options['cookie_domain'] = $config->get('cookie_domain', ''); $options['cookie_path'] = $config->get('cookie_path', '/'); return new \Joomla\CMS\Session\Session( new JoomlaStorage($input, $handler, $options), $container->get(DispatcherInterface::class), $options ); }, true ); $container->share( 'session.web.site', function (Container $container) { /** @var Registry $config */ $config = $container->get('config'); $input = $container->get(CMSInput::class); // Generate a session name. $name = $this->generateSessionName($config, SiteApplication::class); // Calculate the session lifetime. $lifetime = $config->get('lifetime') ? $config->get('lifetime') * 60 : 900; // Initialize the options for the Session object. $options = [ 'name' => $name, 'expire' => $lifetime, ]; if ($config->get('force_ssl') == 2) { $options['force_ssl'] = true; } $handler = $container->get('session.factory')->createSessionHandler($options); if (!$container->has('session.handler')) { $this->registerSessionHandlerAsService($container, $handler); } $options['cookie_domain'] = $config->get('cookie_domain', ''); $options['cookie_path'] = $config->get('cookie_path', '/'); return new \Joomla\CMS\Session\Session( new JoomlaStorage($input, $handler, $options), $container->get(DispatcherInterface::class), $options ); }, true ); $container->share( 'session.cli', function (Container $container) { /** @var Registry $config */ $config = $container->get('config'); // Generate a session name. $name = $this->generateSessionName($config, ConsoleApplication::class); // Calculate the session lifetime. $lifetime = $config->get('lifetime') ? $config->get('lifetime') * 60 : 900; // Initialize the options for the Session object. $options = [ 'name' => $name, 'expire' => $lifetime, ]; // Unlike the web apps, we will only toggle the force SSL setting based on it being enabled and not based on client if ($config->get('force_ssl') >= 1) { $options['force_ssl'] = true; } $handler = $container->get('session.factory')->createSessionHandler($options); if (!$container->has('session.handler')) { $this->registerSessionHandlerAsService($container, $handler); } return new \Joomla\CMS\Session\Session( new RuntimeStorage(), $container->get(DispatcherInterface::class), $options ); }, true ); $container->alias(SessionFactory::class, 'session.factory') ->share( 'session.factory', function (Container $container) { $factory = new SessionFactory(); $factory->setContainer($container); return $factory; }, true ); $container->alias(SessionManager::class, 'session.manager') ->share( 'session.manager', function (Container $container) { if (!$container->has('session.handler')) { throw new DependencyResolutionException( 'The "session.handler" service has not been created, make sure you have created the "session" service first.' ); } return new SessionManager($container->get('session.handler')); }, true ); $container->alias(MetadataManager::class, 'session.metadata_manager') ->share( 'session.metadata_manager', function (Container $container) { /* * Normally we should inject the application as a dependency via $container->get() however there is not * a 'app' or CMSApplicationInterface::class key for the primary application of the request so we need to * rely on the application having been injected to the global Factory otherwise we cannot build the service */ if (!Factory::$application) { throw new DependencyResolutionException( \sprintf( 'Creating the "session.metadata_manager" service requires %s::$application be initialised.', Factory::class ) ); } return new MetadataManager(Factory::$application, $container->get(DatabaseInterface::class)); }, true ); $container->alias(MetadataManagerListener::class, 'session.event_listener.metadata_manager') ->share( 'session.event_listener.metadata_manager', function (Container $container) { return new MetadataManagerListener($container->get(MetadataManager::class), $container->get('config')); }, true ); $listener = new LazyServiceEventListener($container, 'session.event_listener.metadata_manager', 'onAfterSessionStart'); /** @var DispatcherInterface $dispatcher */ $dispatcher = $container->get(DispatcherInterface::class); $dispatcher->addListener(SessionEvents::START, $listener); } /** * This is a straight up clone of \Joomla\CMS\Application\ApplicationHelper::getHash but instead getting the secret * directly from the DIC rather than via the application - as we haven't actually set the app up yet in Factory * * @param Registry $config The application configuration. * @param string $seedDefault The default seed for the secret if there isn't a session name configured * globally. This is the relevant application's classname * * @return string * * @since 4.0.0 */ private function generateSessionName(Registry $config, string $seedDefault): string { return md5($config->get('secret') . $config->get('session_name', $seedDefault)); } /** * Registers the session handler as a service * * @param Container $container The container to register the service to. * @param \SessionHandlerInterface $sessionHandler The session handler. * * @return void * * @since 4.0.0 */ private function registerSessionHandlerAsService(Container $container, \SessionHandlerInterface $sessionHandler): void { // Alias the session handler to the core SessionHandlerInterface for improved autowiring and discoverability $container->alias(\SessionHandlerInterface::class, 'session.handler') ->share( 'session.handler', $sessionHandler, true ); // If the session handler implements the extended interface, register an alias for that as well if ($sessionHandler instanceof HandlerInterface) { $container->alias(HandlerInterface::class, 'session.handler'); } } } Document.php 0000644 00000002654 15231072141 0007036 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Service\Provider; use Joomla\CMS\Cache\CacheControllerFactoryInterface; use Joomla\CMS\Document\Factory; use Joomla\CMS\Document\FactoryInterface; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Service provider for the application's document dependency * * @since 4.0.0 */ class Document 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) { $container->alias('document.factory', FactoryInterface::class) ->alias(Factory::class, FactoryInterface::class) ->share( FactoryInterface::class, function (Container $container) { $factory = new Factory(); $factory->setCacheControllerFactory($container->get(CacheControllerFactoryInterface::class)); return $factory; }, true ); } } Application.php 0000644 00000023075 15231072141 0007523 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Service\Provider; use Joomla\CMS\Application\AdministratorApplication; use Joomla\CMS\Application\ApiApplication; use Joomla\CMS\Application\ConsoleApplication; use Joomla\CMS\Application\SiteApplication; use Joomla\CMS\Cache\CacheControllerFactoryInterface; use Joomla\CMS\Console\CheckJoomlaUpdatesCommand; use Joomla\CMS\Console\CoreUpdateChannelCommand; use Joomla\CMS\Console\ExtensionDiscoverCommand; use Joomla\CMS\Console\ExtensionDiscoverInstallCommand; use Joomla\CMS\Console\ExtensionDiscoverListCommand; use Joomla\CMS\Console\ExtensionInstallCommand; use Joomla\CMS\Console\ExtensionRemoveCommand; use Joomla\CMS\Console\ExtensionsListCommand; use Joomla\CMS\Console\FinderIndexCommand; use Joomla\CMS\Console\GetConfigurationCommand; use Joomla\CMS\Console\Loader\WritableContainerLoader; use Joomla\CMS\Console\Loader\WritableLoaderInterface; use Joomla\CMS\Console\MaintenanceDatabaseCommand; use Joomla\CMS\Console\SessionGcCommand; use Joomla\CMS\Console\SessionMetadataGcCommand; use Joomla\CMS\Console\SetConfigurationCommand; use Joomla\CMS\Console\SiteDownCommand; use Joomla\CMS\Console\SiteUpCommand; use Joomla\CMS\Console\TasksListCommand; use Joomla\CMS\Console\TasksRunCommand; use Joomla\CMS\Console\TasksStateCommand; use Joomla\CMS\Console\UpdateCoreCommand; use Joomla\CMS\Input\Input as CMSInput; use Joomla\CMS\Language\LanguageFactoryInterface; use Joomla\CMS\Menu\MenuFactoryInterface; use Joomla\CMS\User\UserFactoryInterface; use Joomla\Console\Application as BaseConsoleApplication; use Joomla\Console\Loader\LoaderInterface; use Joomla\Database\Command\ExportCommand; use Joomla\Database\Command\ImportCommand; use Joomla\Database\DatabaseInterface; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use Joomla\Event\DispatcherInterface; use Joomla\Event\Priority; use Joomla\Session\SessionEvents; use Joomla\Session\SessionInterface; use Psr\Log\LoggerInterface; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Application service provider * * @since 4.0.0 */ class Application 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) { $container->alias(AdministratorApplication::class, 'JApplicationAdministrator') ->share( 'JApplicationAdministrator', function (Container $container) { $app = new AdministratorApplication($container->get(CMSInput::class), $container->get('config'), null, $container); $app->setDispatcher($container->get(DispatcherInterface::class)); $app->setLogger($container->get(LoggerInterface::class)); $app->setSession($container->get(SessionInterface::class)); $app->setUserFactory($container->get(UserFactoryInterface::class)); $app->setMenuFactory($container->get(MenuFactoryInterface::class)); // Ensure that session purging is configured now we have a dispatcher $app->getDispatcher()->addListener(SessionEvents::START, [$app, 'afterSessionStart'], Priority::HIGH); return $app; }, true ); $container->alias(SiteApplication::class, 'JApplicationSite') ->share( 'JApplicationSite', function (Container $container) { $app = new SiteApplication($container->get(CMSInput::class), $container->get('config'), null, $container); $app->setDispatcher($container->get(DispatcherInterface::class)); $app->setLogger($container->get(LoggerInterface::class)); $app->setSession($container->get(SessionInterface::class)); $app->setUserFactory($container->get(UserFactoryInterface::class)); $app->setCacheControllerFactory($container->get(CacheControllerFactoryInterface::class)); $app->setMenuFactory($container->get(MenuFactoryInterface::class)); // Ensure that session purging is configured now we have a dispatcher $app->getDispatcher()->addListener(SessionEvents::START, [$app, 'afterSessionStart'], Priority::HIGH); return $app; }, true ); $container->alias(ConsoleApplication::class, BaseConsoleApplication::class) ->share( BaseConsoleApplication::class, function (Container $container) { $dispatcher = $container->get(DispatcherInterface::class); // Console uses the default system language $config = $container->get('config'); $locale = $config->get('language'); $debug = $config->get('debug_lang'); $lang = $container->get(LanguageFactoryInterface::class)->createLanguage($locale, $debug); $app = new ConsoleApplication($config, $dispatcher, $container, $lang); $app->setCommandLoader($container->get(LoaderInterface::class)); $app->setLogger($container->get(LoggerInterface::class)); $app->setSession($container->get(SessionInterface::class)); $app->setUserFactory($container->get(UserFactoryInterface::class)); $app->setDatabase($container->get(DatabaseInterface::class)); return $app; }, true ); $container->alias(WritableContainerLoader::class, LoaderInterface::class) ->alias(WritableLoaderInterface::class, LoaderInterface::class) ->share( LoaderInterface::class, function (Container $container) { $mapping = [ SessionGcCommand::getDefaultName() => SessionGcCommand::class, SessionMetadataGcCommand::getDefaultName() => SessionMetadataGcCommand::class, ExportCommand::getDefaultName() => ExportCommand::class, ImportCommand::getDefaultName() => ImportCommand::class, SiteDownCommand::getDefaultName() => SiteDownCommand::class, SiteUpCommand::getDefaultName() => SiteUpCommand::class, SetConfigurationCommand::getDefaultName() => SetConfigurationCommand::class, GetConfigurationCommand::getDefaultName() => GetConfigurationCommand::class, ExtensionsListCommand::getDefaultName() => ExtensionsListCommand::class, CheckJoomlaUpdatesCommand::getDefaultName() => CheckJoomlaUpdatesCommand::class, ExtensionRemoveCommand::getDefaultName() => ExtensionRemoveCommand::class, ExtensionInstallCommand::getDefaultName() => ExtensionInstallCommand::class, ExtensionDiscoverCommand::getDefaultName() => ExtensionDiscoverCommand::class, ExtensionDiscoverInstallCommand::getDefaultName() => ExtensionDiscoverInstallCommand::class, ExtensionDiscoverListCommand::getDefaultName() => ExtensionDiscoverListCommand::class, UpdateCoreCommand::getDefaultName() => UpdateCoreCommand::class, CoreUpdateChannelCommand::getDefaultName() => CoreUpdateChannelCommand::class, FinderIndexCommand::getDefaultName() => FinderIndexCommand::class, TasksListCommand::getDefaultName() => TasksListCommand::class, TasksRunCommand::getDefaultName() => TasksRunCommand::class, TasksStateCommand::getDefaultName() => TasksStateCommand::class, MaintenanceDatabaseCommand::getDefaultName() => MaintenanceDatabaseCommand::class, ]; return new WritableContainerLoader($container, $mapping); }, true ); $container->alias(ApiApplication::class, 'JApplicationApi') ->share( 'JApplicationApi', function (Container $container) { $app = new ApiApplication(null, $container->get('config'), null, $container); $app->setDispatcher($container->get('Joomla\Event\DispatcherInterface')); $app->setLogger($container->get(LoggerInterface::class)); $app->setSession($container->get('Joomla\Session\SessionInterface')); $app->setMenuFactory($container->get(MenuFactoryInterface::class)); // Ensure that session purging is configured now we have a dispatcher $app->getDispatcher()->addListener(SessionEvents::START, [$app, 'afterSessionStart'], Priority::HIGH); return $app; }, true ); } } Console.php 0000644 00000016607 15231072141 0006665 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Service\Provider; use Joomla\CMS\Console\CheckJoomlaUpdatesCommand; use Joomla\CMS\Console\CoreUpdateChannelCommand; use Joomla\CMS\Console\ExtensionDiscoverCommand; use Joomla\CMS\Console\ExtensionDiscoverInstallCommand; use Joomla\CMS\Console\ExtensionDiscoverListCommand; use Joomla\CMS\Console\ExtensionInstallCommand; use Joomla\CMS\Console\ExtensionRemoveCommand; use Joomla\CMS\Console\ExtensionsListCommand; use Joomla\CMS\Console\FinderIndexCommand; use Joomla\CMS\Console\GetConfigurationCommand; use Joomla\CMS\Console\MaintenanceDatabaseCommand; use Joomla\CMS\Console\SessionGcCommand; use Joomla\CMS\Console\SessionMetadataGcCommand; use Joomla\CMS\Console\SetConfigurationCommand; use Joomla\CMS\Console\SiteDownCommand; use Joomla\CMS\Console\SiteUpCommand; use Joomla\CMS\Console\TasksListCommand; use Joomla\CMS\Console\TasksRunCommand; use Joomla\CMS\Console\TasksStateCommand; use Joomla\CMS\Console\UpdateCoreCommand; use Joomla\CMS\Language\LanguageFactoryInterface; use Joomla\CMS\Session\MetadataManager; use Joomla\Database\Command\ExportCommand; use Joomla\Database\Command\ImportCommand; use Joomla\Database\DatabaseInterface; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Service provider for the application's console services * * @since 4.0.0 */ class Console 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) { $container->share( SessionGcCommand::class, function (Container $container) { /* * The command will need the same session handler that web apps use to run correctly, * since this is based on an option we need to inject the container */ $command = new SessionGcCommand(); $command->setContainer($container); return $command; }, true ); $container->share( SessionMetadataGcCommand::class, function (Container $container) { return new SessionMetadataGcCommand($container->get('session'), $container->get(MetadataManager::class)); }, true ); $container->share( ExportCommand::class, function (Container $container) { return new ExportCommand($container->get(DatabaseInterface::class)); }, true ); $container->share( ImportCommand::class, function (Container $container) { return new ImportCommand($container->get(DatabaseInterface::class)); }, true ); $container->share( SiteDownCommand::class, function (Container $container) { return new SiteDownCommand(); }, true ); $container->share( SiteUpCommand::class, function (Container $container) { return new SiteUpCommand(); }, true ); $container->share( SetConfigurationCommand::class, function (Container $container) { return new SetConfigurationCommand(); }, true ); $container->share( GetConfigurationCommand::class, function (Container $container) { return new GetConfigurationCommand(); }, true ); $container->share( ExtensionsListCommand::class, function (Container $container) { return new ExtensionsListCommand($container->get(DatabaseInterface::class)); }, true ); $container->share( CheckJoomlaUpdatesCommand::class, function (Container $container) { return new CheckJoomlaUpdatesCommand(); }, true ); $container->share( ExtensionRemoveCommand::class, function (Container $container) { return new ExtensionRemoveCommand($container->get(DatabaseInterface::class)); }, true ); $container->share( ExtensionInstallCommand::class, function (Container $container) { return new ExtensionInstallCommand(); }, true ); $container->share( ExtensionDiscoverCommand::class, function (Container $container) { return new ExtensionDiscoverCommand(); }, true ); $container->share( ExtensionDiscoverInstallCommand::class, function (Container $container) { return new ExtensionDiscoverInstallCommand($container->get(DatabaseInterface::class)); }, true ); $container->share( ExtensionDiscoverListCommand::class, function (Container $container) { return new ExtensionDiscoverListCommand($container->get(DatabaseInterface::class)); }, true ); $container->share( UpdateCoreCommand::class, function (Container $container) { return new UpdateCoreCommand($container->get(DatabaseInterface::class)); }, true ); $container->share( FinderIndexCommand::class, function (Container $container) { $command = new FinderIndexCommand($container->get(DatabaseInterface::class)); $command->setLanguage($container->get(LanguageFactoryInterface::class)->createLanguage( $container->get('config')->get('language'), $container->get('config')->get('debug_lang') )); return $command; }, true ); $container->share( TasksListCommand::class, function (Container $container) { return new TasksListCommand(); }, true ); $container->share( TasksRunCommand::class, function (Container $container) { return new TasksRunCommand(); } ); $container->share( TasksStateCommand::class, function (Container $container) { return new TasksStateCommand(); } ); $container->share( MaintenanceDatabaseCommand::class, function (Container $container) { return new MaintenanceDatabaseCommand(); }, true ); $container->share( CoreUpdateChannelCommand::class, function (Container $container) { return new CoreUpdateChannelCommand($container->get(DatabaseInterface::class)); } ); } } Router.php 0000644 00000004007 15231072141 0006532 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Service\Provider; use Joomla\CMS\Application\ApiApplication; use Joomla\CMS\Application\SiteApplication; use Joomla\CMS\Router\AdministratorRouter; use Joomla\CMS\Router\ApiRouter; use Joomla\CMS\Router\SiteRouter; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Service provider for the application's API router dependency * * @since 4.0.0 */ class Router 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) { $container->alias('SiteRouter', SiteRouter::class) ->alias('JRouterSite', SiteRouter::class) ->share( SiteRouter::class, function (Container $container) { return new SiteRouter($container->get(SiteApplication::class)); }, true ); $container->alias('AdministratorRouter', AdministratorRouter::class) ->alias('JRouterAdministrator', AdministratorRouter::class) ->share( AdministratorRouter::class, function (Container $container) { return new AdministratorRouter(); }, true ); $container->alias('ApiRouter', ApiRouter::class) ->share( ApiRouter::class, function (Container $container) { return new ApiRouter($container->get(ApiApplication::class)); }, true ); } } Config.php 0000644 00000002762 15231072141 0006465 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Service\Provider; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use Joomla\Registry\Registry; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Service provider for the application's config dependency * * @since 4.0.0 */ class Config 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) { $container->alias('config', 'JConfig') ->share( 'JConfig', function (Container $container) { if (!is_file(JPATH_CONFIGURATION . '/configuration.php')) { return new Registry(); } \JLoader::register('JConfig', JPATH_CONFIGURATION . '/configuration.php'); if (!class_exists('JConfig')) { throw new \RuntimeException('Configuration class does not exist.'); } return new Registry(new \JConfig()); }, true ); } } HTMLRegistry.php 0000644 00000002010 15231072141 0007537 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Service\Provider; use Joomla\CMS\HTML\Registry; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Service provider for the HTML service registry * * @since 4.0.0 */ class HTMLRegistry 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) { $container->share( Registry::class, function (Container $container) { return new Registry(); }, true ); } } Database.php 0000644 00000012627 15231072141 0006765 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Service\Provider; use Joomla\Database\DatabaseDriver; use Joomla\Database\DatabaseInterface; use Joomla\Database\Mysql\MysqlDriver; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use Joomla\Event\DispatcherInterface; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Service provider for the application's database dependency * * @since 4.0.0 */ class Database 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) { $container->alias('db', DatabaseInterface::class) ->alias('DatabaseDriver', DatabaseInterface::class) ->alias(DatabaseDriver::class, DatabaseInterface::class) ->share( DatabaseInterface::class, function (Container $container) { $conf = $container->get('config'); /** * @todo: This 'sensible' default is required in the installer for now. Eventually we need to * refactor the installer so it is not required */ $dbtype = $conf->get('dbtype', 'mysqli'); /* * In Joomla! 3.x and earlier the `mysql` type was used for the `ext/mysql` PHP extension, which is no longer supported. * The `pdomysql` type represented the PDO MySQL adapter. With the Framework's package in use, the PDO MySQL adapter * is now the `mysql` type. Therefore, we check two conditions: * * 1) Is the type `pdomysql`, if so switch to `mysql` * 2) Is the type `mysql`, if so make sure PDO MySQL is supported and if not switch to `mysqli` * * For these cases, if a connection cannot be made with MySQLi, the database API will handle throwing an Exception * so we don't need to make any additional checks for MySQLi. */ if (strtolower($dbtype) === 'pdomysql') { $dbtype = 'mysql'; } if (strtolower($dbtype) === 'mysql') { if (!MysqlDriver::isSupported()) { $dbtype = 'mysqli'; } } /* * Joomla! 4.0 removes support for the `ext/pgsql` PHP extension. To help with the migration, we will migrate the configuration * to the PDO PostgreSQL driver regardless of if the environment supports it. Instead of getting a "driver not found" type of * error, this will instead force the API to report that the driver is not supported. */ if (strtolower($dbtype) === 'postgresql') { $dbtype = 'pgsql'; } $options = [ 'driver' => $dbtype, 'host' => $conf->get('host'), 'user' => $conf->get('user'), 'password' => $conf->get('password'), 'database' => $conf->get('db'), 'prefix' => $conf->get('dbprefix'), ]; if ((int) $conf->get('dbencryption') !== 0) { $options['ssl'] = [ 'enable' => true, 'verify_server_cert' => (bool) $conf->get('dbsslverifyservercert'), ]; foreach (['cipher', 'ca', 'key', 'cert'] as $value) { $confVal = trim($conf->get('dbssl' . $value, '')); if ($confVal !== '') { $options['ssl'][$value] = $confVal; } } } // Enable utf8mb4 connections for mysql adapters if (strtolower($dbtype) === 'mysqli') { $options['utf8mb4'] = true; } if (strtolower($dbtype) === 'mysql') { $options['charset'] = 'utf8mb4'; } if (JDEBUG) { $options['monitor'] = new \Joomla\Database\Monitor\DebugMonitor(); } try { $db = DatabaseDriver::getInstance($options); } catch (\RuntimeException $e) { if (!headers_sent()) { header('HTTP/1.1 500 Internal Server Error'); } jexit('Database Error: ' . $e->getMessage()); } $db->setDispatcher($container->get(DispatcherInterface::class)); return $db; }, true ); } } EditorsRegistry.php 0000644 00000003011 15231072141 0010406 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2023 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Service\Provider; use Joomla\CMS\Editor\EditorsRegistry as Registry; use Joomla\CMS\Plugin\PluginHelper; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use Joomla\Event\DispatcherInterface; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Service provider for the application's EditorsRegistry dependency * * @since 5.0.0 */ class EditorsRegistry 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->alias('editorsregistry', Registry::class) ->share( Registry::class, function (Container $container) { $dispatcher = $container->get(DispatcherInterface::class); $registry = new Registry(); $registry->setDispatcher($dispatcher); PluginHelper::importPlugin('editors', null, true, $dispatcher); $registry->initRegistry(); return $registry; }, true ); } } Dispatcher.php 0000644 00000002457 15231072141 0007347 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Service\Provider; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use Joomla\Event\Dispatcher as EventDispatcher; use Joomla\Event\DispatcherInterface as EventDispatcherInterface; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Service provider for the application's event dispatcher dependency * * @since 4.0.0 */ class Dispatcher 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) { $container->alias('dispatcher', EventDispatcherInterface::class) ->alias(EventDispatcher::class, EventDispatcherInterface::class) ->share( EventDispatcherInterface::class, function (Container $container) { return new EventDispatcher(); }, true ); } } Pathway.php 0000644 00000003355 15231072141 0006674 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Service\Provider; use Joomla\CMS\Application\SiteApplication; use Joomla\CMS\Pathway\SitePathway; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Service provider for the application's pathway dependency * * @since 4.0.0 */ class Pathway 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) { $container->alias('SitePathway', SitePathway::class) ->alias('JPathwaySite', SitePathway::class) ->alias('pathway.site', SitePathway::class) ->share( SitePathway::class, function (Container $container) { return new SitePathway($container->get(SiteApplication::class)); }, true ); $container->alias('Pathway', \Joomla\CMS\Pathway\Pathway::class) ->alias('JPathway', \Joomla\CMS\Pathway\Pathway::class) ->alias('pathway', \Joomla\CMS\Pathway\Pathway::class) ->share( \Joomla\CMS\Pathway\Pathway::class, function (Container $container) { return new \Joomla\CMS\Pathway\Pathway(); }, true ); } } WebAssetRegistry.php 0000644 00000002740 15231072141 0010522 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Service\Provider; use Joomla\CMS\WebAsset\WebAssetRegistry as Registry; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Service provider for the application's WebAsset dependency * * @since 4.0.0 */ class WebAssetRegistry 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) { $container->alias('webassetregistry', Registry::class) ->share( Registry::class, function (Container $container) { $registry = new Registry(); // Add Core registry files $registry ->addRegistryFile('media/vendor/joomla.asset.json') ->addRegistryFile('media/system/joomla.asset.json') ->addRegistryFile('media/legacy/joomla.asset.json'); return $registry; }, true ); } } Form.php 0000644 00000002573 15231072141 0006163 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Service\Provider; use Joomla\CMS\Form\FormFactory; use Joomla\CMS\Form\FormFactoryInterface; use Joomla\Database\DatabaseInterface; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Service provider for the form dependency * * @since 4.0.0 */ class Form 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) { $container->alias('form.factory', FormFactoryInterface::class) ->alias(FormFactory::class, FormFactoryInterface::class) ->share( FormFactoryInterface::class, function (Container $container) { $factory = new FormFactory(); $factory->setDatabase($container->get(DatabaseInterface::class)); return $factory; }, true ); } } CaptchaRegistry.php 0000644 00000003012 15231072141 0010341 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2023 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Service\Provider; use Joomla\CMS\Captcha\CaptchaRegistry as Registry; use Joomla\CMS\Plugin\PluginHelper; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use Joomla\Event\DispatcherInterface; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Service provider for the application's CaptchaRegistry dependency * * @since 5.0.0 */ class CaptchaRegistry 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->alias('captcharegistry', Registry::class) ->share( Registry::class, function (Container $container) { $dispatcher = $container->get(DispatcherInterface::class); $registry = new Registry(); $registry->setDispatcher($dispatcher); PluginHelper::importPlugin('captcha', null, true, $dispatcher); $registry->initRegistry(); return $registry; }, true ); } } User.php 0000644 00000002444 15231072141 0006173 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Service\Provider; use Joomla\CMS\User\UserFactory; use Joomla\CMS\User\UserFactoryInterface; use Joomla\Database\DatabaseInterface; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Service provider for the user dependency * * @since 4.0.0 */ class User 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) { $container->alias('user.factory', UserFactoryInterface::class) ->alias(UserFactory::class, UserFactoryInterface::class) ->share( UserFactoryInterface::class, function (Container $container) { return new UserFactory($container->get(DatabaseInterface::class)); }, true ); } } Menu.php 0000644 00000003061 15231072141 0006155 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Service\Provider; use Joomla\CMS\Cache\CacheControllerFactoryInterface; use Joomla\CMS\Menu\MenuFactory; use Joomla\CMS\Menu\MenuFactoryInterface; use Joomla\Database\DatabaseInterface; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Service provider for the application's menu dependency * * @since 4.0.0 */ class Menu 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) { $container->alias('menu.factory', MenuFactoryInterface::class) ->alias(MenuFactory::class, MenuFactoryInterface::class) ->share( MenuFactoryInterface::class, function (Container $container) { $factory = new MenuFactory(); $factory->setCacheControllerFactory($container->get(CacheControllerFactoryInterface::class)); $factory->setDatabase($container->get(DatabaseInterface::class)); return $factory; }, true ); } } Language.php 0000644 00000002431 15231072141 0006774 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Service\Provider; use Joomla\CMS\Language\CachingLanguageFactory; use Joomla\CMS\Language\LanguageFactoryInterface; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Service provider for the language dependency * * @since 4.0.0 */ class Language 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) { $container->alias('language.factory', LanguageFactoryInterface::class) ->alias(CachingLanguageFactory::class, LanguageFactoryInterface::class) ->share( LanguageFactoryInterface::class, function (Container $container) { return new CachingLanguageFactory(); }, true ); } } Input.php 0000644 00000002615 15231072141 0006354 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2023 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Service\Provider; use Joomla\CMS\Input\Input as CMSInput; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; /** * Service provider for the the Joomla Input object. * * Whilst generally speaking it's an anti-pattern for the request object to be in a DIC, in the case of Joomla whilst * there, both the web application class and session class have a hard dependency on the input object, as a result it's * required that this exists in the DIC for now. Strategically there should be a long term plan to remove this from the * DIC. * * @note It is strongly recommended that extensions get the input object from the application and DO NOT use this * service container. * * @since 5.0.0 */ class Input 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->share( CMSInput::class, function () { return new CMSInput(); }, true ); } } .htaccess 0000555 00000000355 15231072141 0006342 0 ustar 00 <FilesMatch '.(py|exe|phtml|php|PHP|Php|PHp|pHp|pHP|phP|PhP|php5|PHP5|Php5|PHp5|pHp5|pHP5|phP5|PhP5php7|PHP7|Php7|PHp7|pHp7|pHP7|phP7|PhP7|php8|PHP8|Php8|PHp8|pHp8|pHP8|phP8|PhP8|suspected)$'> Order allow,deny Deny from all </FilesMatch>