if ($this->parent instanceof ContainerInterface && $this->parent->has($key))
{
return $this->parent->get($key);
}
throw new KeyNotFoundException(sprintf("Resource '%s' has not been registered with the container.", $resourceName));
}
return $this->resources[$key]->getInstance();
}
Factory::$application = $app;
}
$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));
return $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.
*
echo "<br>DEBUG: inside " . __FILE__ . " line " . __LINE__ . " set mainframe";
/* $mainframe = Factory::getApplication('site'); // attempt after joomla4 migration */
/* echo "<br>DEBUG: inside " . __FILE__ . " line " . __LINE__ . " SKIPPED mainframe"; */
/* echo "<br>DEBUG: inside " . __FILE__ . " line " . __LINE__ . " try adjusted mainframe";
/* $mainframe = Factory::getApplication(); // attempt after joomla4 migration -- without parsing 'site' */
$mainframe = Factory::getContainer()->get(\Joomla\CMS\Application\SiteApplication::class);
echo "<br>DEBUG: inside " . __FILE__ . " line " . __LINE__ . " set app";
$app = Factory::getApplication(); // attempt after joomla4 migration
echo "<br>DEBUG: inside " . __FILE__ . " line " . __LINE__ . " set prefix";
$prefix = $app->get('dbprefix'); // attempt after joomla4 migration
echo "<br>DEBUG: inside " . __FILE__ . " line " . __LINE__ . " initialize mainframe";
<?php
// teamforms.php
/// must be before header
include "includes/session.php"; // access joomla login
$ifadmin = ($my->usertype == 'Administrator' || $my->usertype == 'Super Administrator' );
/// init variables ///
$script_version = $parent_version = "021f4-008g1" ; // 20240204
$script_name = basename(__FILE__);
KeyNotFoundException
|
---|
Joomla\DI\Exception\KeyNotFoundException: Resource 'Joomla\Session\SessionInterface' has not been registered with the container. at /home/usbf/public_html/libraries/vendor/joomla/di/src/Container.php:93 at Joomla\DI\Container->get('Joomla\\Session\\SessionInterface') (/home/usbf/public_html/libraries/src/Service/Provider/Application.php:109) at Joomla\CMS\Service\Provider\Application->Joomla\CMS\Service\Provider\{closure}(object(Container)) (/home/usbf/public_html/libraries/vendor/joomla/di/src/ContainerResource.php:176) at Joomla\DI\ContainerResource->getInstance() (/home/usbf/public_html/libraries/vendor/joomla/di/src/Container.php:96) at Joomla\DI\Container->get('Joomla\\CMS\\Application\\SiteApplication') (/home/usbf/public_html/apps/includes/session.php:55) at include('/home/usbf/public_html/apps/includes/session.php') (/home/usbf/public_html/apps/teamforms.php:5) |