Warning: Class "Joomla\CMS\Application\CMSApplication" not found in /mnt/web004/d3/75/56963175/htdocs/libraries/loader.php on line 576
/**
* Joomla! Site Application class
*
* @since 3.2
*/
final class SiteApplication extends CMSApplication
{
use CacheControllerFactoryAwareTrait;
use MultiFactorAuthenticationHandler;
/**
* @return void
* @private
*/
function includeFile($file)
{
include $file;
}
* @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
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(SiteApplication::class, 'JApplicationSite')
->share(
'JApplicationSite',
function (Container $container) {
$app = new SiteApplication(null, $container->get('config'), null, $container);
// The session service provider needs Factory::$application, set it if still null
if (Factory::$application === null) {
Factory::$application = $app;
}
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 file
require_once dirname(__FILE__) . '/includes/app.php';
ClassNotFoundError
|
---|
Symfony\Component\ErrorHandler\Error\ClassNotFoundError: Attempted to load class "CMSApplication" from namespace "Joomla\CMS\Application". Did you forget a "use" statement for another namespace? at /mnt/web004/d3/75/56963175/htdocs/libraries/src/Application/SiteApplication.php:39 at include() (/mnt/web004/d3/75/56963175/htdocs/libraries/vendor/composer/ClassLoader.php:571) at Composer\Autoload\includeFile() (/mnt/web004/d3/75/56963175/htdocs/libraries/vendor/composer/ClassLoader.php:428) at Composer\Autoload\ClassLoader->loadClass() (/mnt/web004/d3/75/56963175/htdocs/libraries/src/Autoload/ClassLoader.php:59) at Joomla\CMS\Autoload\ClassLoader->loadClass() (/mnt/web004/d3/75/56963175/htdocs/libraries/src/Service/Provider/Application.php:100) at Joomla\CMS\Service\Provider\Application->Joomla\CMS\Service\Provider\{closure}() (/mnt/web004/d3/75/56963175/htdocs/libraries/vendor/joomla/di/src/ContainerResource.php:176) at Joomla\DI\ContainerResource->getInstance() (/mnt/web004/d3/75/56963175/htdocs/libraries/vendor/joomla/di/src/Container.php:96) at Joomla\DI\Container->get() (/mnt/web004/d3/75/56963175/htdocs/includes/app.php:55) at require_once('/mnt/web004/d3/75/56963175/htdocs/includes/app.php') (/mnt/web004/d3/75/56963175/htdocs/index.php:32) |