$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 { $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. * if (Factory::$language) { $attributes['language'] = Factory::getLanguage()->getTag(); $attributes['direction'] = Factory::getLanguage()->isRtl() ? 'rtl' : 'ltr'; } return Factory::getContainer()->get(FactoryInterface::class)->createDocument($this->type, $attributes); }} */ public function getDocument(): Document { // Load the document if not already if (!$this->document) { $this->document = $this->loadDocument(); } return $this->document; } // Default to the HTML renderer $renderer = AbstractRenderer::getRenderer('html'); } // Reset the document object in the factory, this gives us a clean slate and lets everything render properly Factory::$document = $renderer->getDocument(); Factory::getApplication()->loadDocument(Factory::$document); // Trigger the onAfterInitialiseDocument event. $app->getDispatcher()->dispatch( 'onAfterInitialiseDocument', * @since 3.10.0 */ public static function handleException(\Throwable $error) { static::logException($error); static::render($error); } /** * Render the error page based on an exception. * ); // Trigger the onError event. $this->dispatchEvent('onError', $event); ExceptionHandler::handleException($event->getError()); } // Trigger the onBeforeRespond event. $this->dispatchEvent( 'onBeforeRespond',// Set the application as global app\Joomla\CMS\Factory::$application = $app;// Execute the application.$app->execute(); // ... die die();}// Run the application - All executable code should be triggered through this filerequire_once __DIR__ . '/includes/app.php'; $this->processParseRules($uri, self::PROCESS_AFTER); // Check if all parts of the URL have been parsed. // Otherwise we have an invalid URL if (\strlen($uri->getPath()) > 0) { throw new RouteNotFoundException(Text::_('JERROR_PAGE_NOT_FOUND')); } if ($setVars) { $this->setVars($uri->getQuery(true)); // Get the full request URI. $uri = clone Uri::getInstance(); // It is not possible to inject the SiteRouter as it requires a SiteApplication // and we would end in an infinite loop $result = $this->getContainer()->get(SiteRouter::class)->parse($uri, true); $active = $this->getMenu()->getActive(); if ( $active !== null // Mark afterInitialise in the profiler. JDEBUG ? $this->profiler->mark('afterInitialise') : null; // Route the application $this->route(); // Mark afterRoute in the profiler. JDEBUG ? $this->profiler->mark('afterRoute') : null; if (!$this->isHandlingMultiFactorAuthentication()) { $this->sanityCheckSystemVariables(); $this->setupLogging(); $this->createExtensionNamespaceMap(); // Perform application routines. $this->doExecute(); // If we have an application document object, render it. if ($this->document instanceof \Joomla\CMS\Document\Document) { // Render the application output. $this->render();// Set the application as global app\Joomla\CMS\Factory::$application = $app;// Execute the application.$app->execute(); // ... die die();}// Run the application - All executable code should be triggered through this filerequire_once __DIR__ . '/includes/app.php';|
[2/2]
ClassNotFoundError
|
|---|
Symfony\Component\ErrorHandler\Error\ClassNotFoundError:
Attempted to load class "Factory" from namespace "Joomla\CMS\Document".
Did you forget a "use" statement for "_JchOptimizeVendor\V91\Laminas\Paginator\Factory"?
at /home/u576841363/domains/e-repair.com/public_html/libraries/src/Service/Provider/Document.php:45
at Joomla\CMS\Service\Provider\Document->Joomla\CMS\Service\Provider\{closure}()
(/home/u576841363/domains/e-repair.com/public_html/libraries/vendor/joomla/di/src/ContainerResource.php:162)
at Joomla\DI\ContainerResource->getInstance()
(/home/u576841363/domains/e-repair.com/public_html/libraries/vendor/joomla/di/src/Container.php:95)
at Joomla\DI\Container->get()
(/home/u576841363/domains/e-repair.com/public_html/libraries/src/Error/AbstractRenderer.php:112)
at Joomla\CMS\Error\AbstractRenderer->loadDocument()
(/home/u576841363/domains/e-repair.com/public_html/libraries/src/Error/AbstractRenderer.php:54)
at Joomla\CMS\Error\AbstractRenderer->getDocument()
(/home/u576841363/domains/e-repair.com/public_html/libraries/src/Exception/ExceptionHandler.php:130)
at Joomla\CMS\Exception\ExceptionHandler::render()
(/home/u576841363/domains/e-repair.com/public_html/libraries/src/Exception/ExceptionHandler.php:76)
at Joomla\CMS\Exception\ExceptionHandler::handleException()
(/home/u576841363/domains/e-repair.com/public_html/libraries/src/Application/CMSApplication.php:334)
at Joomla\CMS\Application\CMSApplication->execute()
(/home/u576841363/domains/e-repair.com/public_html/includes/app.php:58)
at require_once('/home/u576841363/domains/e-repair.com/public_html/includes/app.php')
(/home/u576841363/domains/e-repair.com/public_html/index.php:51)
|
|
[1/2]
RouteNotFoundException
|
|---|
Joomla\CMS\Router\Exception\RouteNotFoundException:
Pagina non trovata
at /home/u576841363/domains/e-repair.com/public_html/libraries/src/Router/Router.php:166
at Joomla\CMS\Router\Router->parse()
(/home/u576841363/domains/e-repair.com/public_html/libraries/src/Application/SiteApplication.php:767)
at Joomla\CMS\Application\SiteApplication->route()
(/home/u576841363/domains/e-repair.com/public_html/libraries/src/Application/SiteApplication.php:243)
at Joomla\CMS\Application\SiteApplication->doExecute()
(/home/u576841363/domains/e-repair.com/public_html/libraries/src/Application/CMSApplication.php:304)
at Joomla\CMS\Application\CMSApplication->execute()
(/home/u576841363/domains/e-repair.com/public_html/includes/app.php:58)
at require_once('/home/u576841363/domains/e-repair.com/public_html/includes/app.php')
(/home/u576841363/domains/e-repair.com/public_html/index.php:51)
|