File manager - Edit - /home/ferretapmx/public_html/Provider.zip
Back
PK ��\�]"� � Logger.phpnu �[��� <?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 ); } } PK ��\�m�@� � Toolbar.phpnu �[��� <?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 ); } } PK ��\H�)�F F CacheController.phpnu �[��� <?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 ); } } PK ��\g���C C Authentication.phpnu �[��� <?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 ); } } PK ��\��-�2 �2 Session.phpnu �[��� <?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'); } } } PK ��\�R c� � Document.phpnu �[��� <?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 ); } } PK ��\�G��=&