* * @since 1.7.0 */ public function __construct($options) { $this->cache = new Cache($options); $this->options = &$this->cache->_options; // Overwrite default options with given options foreach ($options as $option => $value) { if ($value !== null) { // The class should now be loaded if (!class_exists($class)) { throw new \RuntimeException('Unable to load Cache Controller: ' . $type, 500); } return new $class($options); }} return $items; }; try { /** @var CallbackController $cache */ $cache = $this->getCacheControllerFactory()->createCacheController('callback', ['defaultgroup' => 'com_menus']); $this->items = $cache->get($loader, [], md5(\get_class($this)), false); } catch (CacheExceptionInterface) { try { $this->items = $loader(); * @since 1.5 */ public function getMenu() { if (!$this->itemsLoaded) { $this->load(); foreach ($this->items as $item) { if ($item->home) { $this->default[trim($item->language)] = $item->id; } */ public function getItem($id) { $result = null; if (isset($this->getMenu()[$id])) { $result = &$this->getMenu()[$id]; } return $result; } // Get the id of the active menu item $menu = $this->getMenu(); $item = $menu->getActive(); if (!$item) { $item = $menu->getItem($this->input->getInt('Itemid', null)); } $id = 0; if (\is_object($item)) { public function render(\Throwable $error): string { $app = Factory::getApplication(); // Get the current template from the application $template = $app->getTemplate(true); // Push the error object into the document $this->getDocument()->setError($error); // Add registry file for the template asset 'subject' => $app, 'document' => $renderer->getDocument(), ]) ); $data = $renderer->render($error); // If nothing was rendered, just use the message from the Exception if (empty($data)) { $data = $error->getMessage(); } * @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'; * * @since 1.7.0 */ public function __construct($options) { $this->cache = new Cache($options); $this->options = &$this->cache->_options; // Overwrite default options with given options foreach ($options as $option => $value) { if ($value !== null) { // The class should now be loaded if (!class_exists($class)) { throw new \RuntimeException('Unable to load Cache Controller: ' . $type, 500); } return new $class($options); }} return $components; }; /** @var CallbackController $cache */ $cache = Factory::getContainer()->get(CacheControllerFactoryInterface::class)->createCacheController('callback', ['defaultgroup' => '_system']); try { static::$components = $cache->get($loader, [], __METHOD__); } catch (CacheExceptionInterface) { static::$components = $loader(); * @since 3.6.3 */ public static function getComponents() { if (empty(static::$components)) { static::load(); } return static::$components; } * * @since 1.5 */ public static function getComponent($option, $strict = false) { $components = static::getComponents(); if (isset($components[$option])) { return $components[$option]; } * @see Registry * @since 1.5 */ public static function getParams($option, $strict = false) { return static::getComponent($option, $strict)->getParams(); } /** * Applies the global text filters to arbitrary text as per settings for current user groups * { $user = Factory::getUser(); // If the user is a guest we populate it with the guest user group. if ($user->guest) { $guestUsergroup = ComponentHelper::getParams('com_users')->get('guest_usergroup', 1); $user->groups = [$guestUsergroup]; } if ($plugin = PluginHelper::getPlugin('system', 'languagefilter')) { $pluginParams = new Registry($plugin->params); * @since 3.2 */ protected function doExecute() { // Initialise the application $this->initialiseApp(); // Mark afterInitialise in the profiler. JDEBUG ? $this->profiler->mark('afterInitialise') : null; // Route the application $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 "Cache" from namespace "Joomla\CMS\Cache".
Did you forget a "use" statement for another namespace?
at /homepages/17/d226403952/htdocs/Joomla/libraries/src/Cache/CacheController.php:53
at Joomla\CMS\Cache\CacheController->__construct()
(/homepages/17/d226403952/htdocs/Joomla/libraries/src/Cache/CacheControllerFactory.php:49)
at Joomla\CMS\Cache\CacheControllerFactory->createCacheController()
(/homepages/17/d226403952/htdocs/Joomla/libraries/src/Menu/SiteMenu.php:177)
at Joomla\CMS\Menu\SiteMenu->load()
(/homepages/17/d226403952/htdocs/Joomla/libraries/src/Menu/AbstractMenu.php:333)
at Joomla\CMS\Menu\AbstractMenu->getMenu()
(/homepages/17/d226403952/htdocs/Joomla/libraries/src/Menu/AbstractMenu.php:164)
at Joomla\CMS\Menu\AbstractMenu->getItem()
(/homepages/17/d226403952/htdocs/Joomla/libraries/src/Application/SiteApplication.php:429)
at Joomla\CMS\Application\SiteApplication->getTemplate()
(/homepages/17/d226403952/htdocs/Joomla/libraries/src/Error/Renderer/HtmlRenderer.php:50)
at Joomla\CMS\Error\Renderer\HtmlRenderer->render()
(/homepages/17/d226403952/htdocs/Joomla/libraries/src/Exception/ExceptionHandler.php:142)
at Joomla\CMS\Exception\ExceptionHandler::render()
(/homepages/17/d226403952/htdocs/Joomla/libraries/src/Exception/ExceptionHandler.php:76)
at Joomla\CMS\Exception\ExceptionHandler::handleException()
(/homepages/17/d226403952/htdocs/Joomla/libraries/src/Application/CMSApplication.php:334)
at Joomla\CMS\Application\CMSApplication->execute()
(/homepages/17/d226403952/htdocs/Joomla/includes/app.php:58)
at require_once('/homepages/17/d226403952/htdocs/Joomla/includes/app.php')
(/homepages/17/d226403952/htdocs/Joomla/index.php:54)
|
|
[1/2]
Error
|
|---|
Error:
Class "Joomla\CMS\Cache\Cache" not found
at /homepages/17/d226403952/htdocs/Joomla/libraries/src/Cache/CacheController.php:53
at Joomla\CMS\Cache\CacheController->__construct()
(/homepages/17/d226403952/htdocs/Joomla/libraries/src/Cache/CacheControllerFactory.php:49)
at Joomla\CMS\Cache\CacheControllerFactory->createCacheController()
(/homepages/17/d226403952/htdocs/Joomla/libraries/src/Component/ComponentHelper.php:407)
at Joomla\CMS\Component\ComponentHelper::load()
(/homepages/17/d226403952/htdocs/Joomla/libraries/src/Component/ComponentHelper.php:428)
at Joomla\CMS\Component\ComponentHelper::getComponents()
(/homepages/17/d226403952/htdocs/Joomla/libraries/src/Component/ComponentHelper.php:56)
at Joomla\CMS\Component\ComponentHelper::getComponent()
(/homepages/17/d226403952/htdocs/Joomla/libraries/src/Component/ComponentHelper.php:114)
at Joomla\CMS\Component\ComponentHelper::getParams()
(/homepages/17/d226403952/htdocs/Joomla/libraries/src/Application/SiteApplication.php:569)
at Joomla\CMS\Application\SiteApplication->initialiseApp()
(/homepages/17/d226403952/htdocs/Joomla/libraries/src/Application/SiteApplication.php:237)
at Joomla\CMS\Application\SiteApplication->doExecute()
(/homepages/17/d226403952/htdocs/Joomla/libraries/src/Application/CMSApplication.php:304)
at Joomla\CMS\Application\CMSApplication->execute()
(/homepages/17/d226403952/htdocs/Joomla/includes/app.php:58)
at require_once('/homepages/17/d226403952/htdocs/Joomla/includes/app.php')
(/homepages/17/d226403952/htdocs/Joomla/index.php:54)
|