$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();
* 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';
/**
* Component class for com_guidedtours
*
* @since 4.3.0
*/
class GuidedtoursComponent extends MVCComponent implements BootableExtensionInterface
{
use HTMLRegistryAwareTrait;
/**
* The step type
*
* @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->set(
PluginInterface::class,
function (Container $container) {
$app = Factory::getApplication();
$plugin = new GuidedTours(
$container->get(DispatcherInterface::class),
(array) PluginHelper::getPlugin('system', 'guidedtours'),
$app->isClient('administrator')
);
}
return $this->instance;
}
return $callable($this->container);
}
/**
* Get the factory
*
}
throw new KeyNotFoundException(sprintf("Resource '%s' has not been registered with the container.", $resourceName));
}
return $this->resources[$key]->getInstance();
}
/**
* Check if specified resource exists.
*
'container' => $container,
]
)
);
$extension = $container->get($type);
if ($extension instanceof BootableExtensionInterface) {
$extension->boot($container);
}
$plugin = str_starts_with($plugin, 'plg_') ? substr($plugin, 4) : $plugin;
// Path to look for services
$path = JPATH_SITE . '/plugins/' . $type . '/' . $plugin;
return $this->loadExtension(PluginInterface::class, $plugin . ':' . $type, $path);
}
/**
* Loads the extension.
*
return;
}
$plugins[$hash] = true;
$plugin = Factory::getApplication()->bootPlugin($plugin->name, $plugin->type);
if ($dispatcher && $plugin instanceof DispatcherAwareInterface) {
$plugin->setDispatcher($dispatcher);
}
$plugins = static::load();
// Get the specified plugin(s).
for ($i = 0, $t = \count($plugins); $i < $t; $i++) {
if ($plugins[$i]->type === $type && ($plugin === null || $plugins[$i]->name === $plugin)) {
static::import($plugins[$i], $autocreate, $dispatcher);
$results = true;
}
}
// Bail out early if we're not using default args
// Load the behaviour plugins
PluginHelper::importPlugin('behaviour', null, true, $this->getDispatcher());
// Trigger the onAfterInitialise event.
PluginHelper::importPlugin('system', null, true, $this->getDispatcher());
$this->dispatchEvent(
'onAfterInitialise',
new AfterInitialiseEvent('onAfterInitialise', ['subject' => $this])
);
}
$options['language'] = 'en-GB';
}
}
// Finish initialisation
parent::initialiseApp($options);
}
/**
* Load the library language files for the application
*
* @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();
* 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';
[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 another namespace? at /home/aytovaldesanvice/public_html/libraries/src/Service/Provider/Document.php:45 at Joomla\CMS\Service\Provider\Document->Joomla\CMS\Service\Provider\{closure}(object(Container)) (/home/aytovaldesanvice/public_html/libraries/vendor/joomla/di/src/ContainerResource.php:166) at Joomla\DI\ContainerResource->getInstance() (/home/aytovaldesanvice/public_html/libraries/vendor/joomla/di/src/Container.php:95) at Joomla\DI\Container->get('Joomla\\CMS\\Document\\FactoryInterface') (/home/aytovaldesanvice/public_html/libraries/src/Error/AbstractRenderer.php:112) at Joomla\CMS\Error\AbstractRenderer->loadDocument() (/home/aytovaldesanvice/public_html/libraries/src/Error/AbstractRenderer.php:54) at Joomla\CMS\Error\AbstractRenderer->getDocument() (/home/aytovaldesanvice/public_html/libraries/src/Exception/ExceptionHandler.php:124) at Joomla\CMS\Exception\ExceptionHandler::render(object(Error)) (/home/aytovaldesanvice/public_html/libraries/src/Exception/ExceptionHandler.php:73) at Joomla\CMS\Exception\ExceptionHandler::handleException(object(Error)) (/home/aytovaldesanvice/public_html/libraries/src/Application/CMSApplication.php:336) at Joomla\CMS\Application\CMSApplication->execute() (/home/aytovaldesanvice/public_html/includes/app.php:58) at require_once('/home/aytovaldesanvice/public_html/includes/app.php') (/home/aytovaldesanvice/public_html/index.php:32) |
[1/2]
Error
|
---|
Error: Interface "Joomla\CMS\Extension\BootableExtensionInterface" not found at /home/aytovaldesanvice/public_html/administrator/components/com_guidedtours/src/Extension/GuidedtoursComponent.php:27 at include() (/home/aytovaldesanvice/public_html/libraries/vendor/composer/ClassLoader.php:576) at Composer\Autoload\{closure}('/home/aytovaldesanvice/public_html/administrator/components/com_guidedtours/src/Extension/GuidedtoursComponent.php') (/home/aytovaldesanvice/public_html/libraries/vendor/composer/ClassLoader.php:427) at Composer\Autoload\ClassLoader->loadClass('Joomla\\Component\\Guidedtours\\Administrator\\Extension\\GuidedtoursComponent') (/home/aytovaldesanvice/public_html/libraries/src/Autoload/ClassLoader.php:59) at Joomla\CMS\Autoload\ClassLoader->loadClass('Joomla\\Component\\Guidedtours\\Administrator\\Extension\\GuidedtoursComponent') (/home/aytovaldesanvice/public_html/plugins/system/guidedtours/services/provider.php:39) at Joomla\DI\ServiceProviderInterface@anonymous /home/aytovaldesanvice/public_html/plugins/system/guidedtours/services/provider.php:22$1b5a->{closure}(object(Container)) (/home/aytovaldesanvice/public_html/libraries/vendor/joomla/di/src/ContainerResource.php:172) at Joomla\DI\ContainerResource->getInstance() (/home/aytovaldesanvice/public_html/libraries/vendor/joomla/di/src/Container.php:95) at Joomla\DI\Container->get('Joomla\\CMS\\Extension\\PluginInterface') (/home/aytovaldesanvice/public_html/libraries/src/Extension/ExtensionManagerTrait.php:177) at Joomla\CMS\Application\CMSApplication->loadExtension('Joomla\\CMS\\Extension\\PluginInterface', 'guidedtours:system', '/home/aytovaldesanvice/public_html/plugins/system/guidedtours') (/home/aytovaldesanvice/public_html/libraries/src/Extension/ExtensionManagerTrait.php:99) at Joomla\CMS\Application\CMSApplication->bootPlugin('guidedtours', 'system') (/home/aytovaldesanvice/public_html/libraries/src/Plugin/PluginHelper.php:232) at Joomla\CMS\Plugin\PluginHelper::import(object(stdClass), true, object(Dispatcher)) (/home/aytovaldesanvice/public_html/libraries/src/Plugin/PluginHelper.php:192) at Joomla\CMS\Plugin\PluginHelper::importPlugin('system', null, true, object(Dispatcher)) (/home/aytovaldesanvice/public_html/libraries/src/Application/CMSApplication.php:765) at Joomla\CMS\Application\CMSApplication->initialiseApp(array('language' => 'es-ES')) (/home/aytovaldesanvice/public_html/libraries/src/Application/SiteApplication.php:643) at Joomla\CMS\Application\SiteApplication->initialiseApp() (/home/aytovaldesanvice/public_html/libraries/src/Application/SiteApplication.php:238) at Joomla\CMS\Application\SiteApplication->doExecute() (/home/aytovaldesanvice/public_html/libraries/src/Application/CMSApplication.php:306) at Joomla\CMS\Application\CMSApplication->execute() (/home/aytovaldesanvice/public_html/includes/app.php:58) at require_once('/home/aytovaldesanvice/public_html/includes/app.php') (/home/aytovaldesanvice/public_html/index.php:32) |