~q@ Pk3C ~q@ Pk3C ~q@ Pk3C ~q@ Pk3C " ~q@ Pk3C & ~q@ Pk3C * ~q@ Pk3C . ~q@ Pk3C y s 5 ~q@
/** * Default factory for creating User objects * * @since 4.0.0 */class UserFactory implements UserFactoryInterface{ /** * The database. * * @var DatabaseInterface * * @param string $file * @return void */ self::$includeFile = \Closure::bind(static function($file) { include $file; }, null, null); }} */ public function loadClass($class) { if ($file = $this->findFile($class)) { $includeFile = self::$includeFile; $includeFile($file); return true; } return null; * * @since 3.4 */ public function loadClass($class) { if ($result = $this->loader->loadClass($class)) { \JLoader::applyAliasFor($class); } return $result; } $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 ); }} { $callable = $this->factory; if ($this->isShared()) { if ($this->instance === null) { $this->instance = $callable($this->container); } return $this->instance; } } throw new KeyNotFoundException(sprintf("Resource '%s' has not been registered with the container.", $resourceName)); } return $this->resources[$key]->getInstance(); } /** * Check if specified resource exists. * 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); { $callable = $this->factory; if ($this->isShared()) { if ($this->instance === null) { $this->instance = $callable($this->container); } return $this->instance; } } throw new KeyNotFoundException(sprintf("Resource '%s' has not been registered with the container.", $resourceName)); } return $this->resources[$key]->getInstance(); } /** * Check if specified resource exists. * ->alias(\Joomla\CMS\Session\Session::class, 'session.web.site') ->alias(\Joomla\Session\Session::class, 'session.web.site') ->alias(\Joomla\Session\SessionInterface::class, 'session.web.site');// Instantiate the application.$app = $container->get(\Joomla\CMS\Application\SiteApplication::class);// Set the application as global app\Joomla\CMS\Factory::$application = $app;// Execute the application. * define() is used rather than "const" to not error for PHP 5.2 and lower */define('_JEXEC', 1);// Run the application - All executable code should be triggered through this filerequire_once dirname(__FILE__) . '/includes/app.php';|
ClassNotFoundError
|
|---|
Symfony\Component\ErrorHandler\Error\ClassNotFoundError:
Attempted to load interface "UserFactoryInterface" from namespace "Joomla\CMS\User".
Did you forget a "use" statement for another namespace?
at /datas/yulpa173848/sites/test2025.samclap-ufolep.fr/htdocs/libraries/src/User/UserFactory.php:23
at include()
(/datas/yulpa173848/sites/test2025.samclap-ufolep.fr/htdocs/libraries/vendor/composer/ClassLoader.php:576)
at Composer\Autoload\{closure}('/datas/yulpa173848/sites/test2025.samclap-ufolep.fr/htdocs/libraries/vendor/composer/../../../libraries/src/User/UserFactory.php')
(/datas/yulpa173848/sites/test2025.samclap-ufolep.fr/htdocs/libraries/vendor/composer/ClassLoader.php:427)
at Composer\Autoload\ClassLoader->loadClass('Joomla\\CMS\\User\\UserFactory')
(/datas/yulpa173848/sites/test2025.samclap-ufolep.fr/htdocs/libraries/src/Autoload/ClassLoader.php:59)
at Joomla\CMS\Autoload\ClassLoader->loadClass('Joomla\\CMS\\User\\UserFactory')
(/datas/yulpa173848/sites/test2025.samclap-ufolep.fr/htdocs/libraries/src/Service/Provider/User.php:45)
at Joomla\CMS\Service\Provider\User->Joomla\CMS\Service\Provider\{closure}(object(Container))
(/datas/yulpa173848/sites/test2025.samclap-ufolep.fr/htdocs/libraries/vendor/joomla/di/src/ContainerResource.php:166)
at Joomla\DI\ContainerResource->getInstance()
(/datas/yulpa173848/sites/test2025.samclap-ufolep.fr/htdocs/libraries/vendor/joomla/di/src/Container.php:95)
at Joomla\DI\Container->get('Joomla\\CMS\\User\\UserFactoryInterface')
(/datas/yulpa173848/sites/test2025.samclap-ufolep.fr/htdocs/libraries/src/Service/Provider/Application.php:105)
at Joomla\CMS\Service\Provider\Application->Joomla\CMS\Service\Provider\{closure}(object(Container))
(/datas/yulpa173848/sites/test2025.samclap-ufolep.fr/htdocs/libraries/vendor/joomla/di/src/ContainerResource.php:166)
at Joomla\DI\ContainerResource->getInstance()
(/datas/yulpa173848/sites/test2025.samclap-ufolep.fr/htdocs/libraries/vendor/joomla/di/src/Container.php:95)
at Joomla\DI\Container->get('Joomla\\CMS\\Application\\SiteApplication')
(/datas/yulpa173848/sites/test2025.samclap-ufolep.fr/htdocs/includes/app.php:52)
at require_once('/datas/yulpa173848/sites/test2025.samclap-ufolep.fr/htdocs/includes/app.php')
(/datas/yulpa173848/sites/test2025.samclap-ufolep.fr/htdocs/index.php:32)
|