*/
class FilesystemLoader implements LoaderInterface, ExistsLoaderInterface, SourceContextLoaderInterface
{
/** Identifier of the main namespace. */
const MAIN_NAMESPACE = '__main__';
protected $paths = [];
protected $cache = [];
protected $errorCache = [];
private $rootPath;
/**
* @param string|array $paths A path or an array of paths where to look for templates
* @param string|null $rootPath The root path common to all relative paths (null for getcwd())
*/
public function __construct($paths = [], $rootPath = null)
{
$this->rootPath = (null === $rootPath ? getcwd() : $rootPath).\DIRECTORY_SEPARATOR;
if (false !== $realPath = realpath($rootPath)) {
$this->rootPath = $realPath.\DIRECTORY_SEPARATOR;
}
if ($paths) {
$this->setPaths($paths);
}
}
/**
* Returns the paths to the templates.
*
* @param string $namespace A path namespace
*
* @return array The array of paths where to look for templates
*/
public function getPaths($namespace = self::MAIN_NAMESPACE)
{
return isset($this->paths[$namespace]) ? $this->paths[$namespace] : [];
}
Arguments
"realpath(): Passing null to parameter #1 ($path) of type string is deprecated"
*/
class FilesystemLoader implements LoaderInterface, ExistsLoaderInterface, SourceContextLoaderInterface
{
/** Identifier of the main namespace. */
const MAIN_NAMESPACE = '__main__';
protected $paths = [];
protected $cache = [];
protected $errorCache = [];
private $rootPath;
/**
* @param string|array $paths A path or an array of paths where to look for templates
* @param string|null $rootPath The root path common to all relative paths (null for getcwd())
*/
public function __construct($paths = [], $rootPath = null)
{
$this->rootPath = (null === $rootPath ? getcwd() : $rootPath).\DIRECTORY_SEPARATOR;
if (false !== $realPath = realpath($rootPath)) {
$this->rootPath = $realPath.\DIRECTORY_SEPARATOR;
}
if ($paths) {
$this->setPaths($paths);
}
}
/**
* Returns the paths to the templates.
*
* @param string $namespace A path namespace
*
* @return array The array of paths where to look for templates
*/
public function getPaths($namespace = self::MAIN_NAMESPACE)
{
return isset($this->paths[$namespace]) ? $this->paths[$namespace] : [];
}
Arguments
/** @var Config $global */
$global = $gantry['global'];
$cachePath = $global->get('compile_twig', 1) ? $this->getCachePath('twig') : null;
if ($cachePath) {
/** @phpstan-ignore-next-line */
if (Environment::VERSION_ID > 3) {
// Twig 3 support.
$cache = new FilesystemCache($cachePath, FilesystemCache::FORCE_BYTECODE_INVALIDATION);
/** @phpstan-ignore-next-line */
} else {
$cache = new TwigCacheFilesystem($cachePath, FilesystemCache::FORCE_BYTECODE_INVALIDATION);
}
} else {
$cache = null;
}
$debug = $gantry->debug();
$production = (bool) $global->get('production', 1);
$loader = new FilesystemLoader();
$params = [
'cache' => $cache,
'debug' => $debug,
'auto_reload' => !$production,
'autoescape' => 'html'
];
$twig = new Environment($loader, $params);
$this->setTwigLoaderPaths($loader);
if ($debug) {
$twig->addExtension(new DebugExtension());
}
$this->renderer = $this->extendTwig($twig, $loader);
}
return $this->renderer;
}
$this->renderer = $this->extendTwig($twig, $loader);
}
return $this->renderer;
}
/**
* Render a template file by using given context.
*
* @param string $file
* @param array $context
* @return string
*/
public function render($file, array $context = [])
{
// Include Gantry specific things to the context.
$context = $this->getContext($context);
return $this->renderer()->render($file, $context);
}
/**
* Compile and render twig string.
*
* @param string $string
* @param array $context
* @return string
*/
public function compile($string, array $context = [])
{
$renderer = $this->renderer();
$template = $renderer->createTemplate($string);
// Include Gantry specific things to the context.
$context = $this->getContext($context);
return $template->render($context);
}
$joomla->document = $this;
/** @var Theme $theme */
$theme = $gantry['theme'];
$app = Factory::getApplication();
$context = array(
'errorcode' => isset($this->error) ? $this->error->getCode() : null,
'error' => isset($this->error) ? $this->error->getMessage() : null,
'debug' => $app->get('debug_lang', '0') == '1' || $app->get('debug', '0') == '1',
'backtrace' => $this->debug ? $this->renderBacktrace() : null
);
// Reset used outline configuration.
unset($gantry['configuration']);
// Render the page.
echo $theme
->setLayout('_error', true)
->render('error.html.twig', $context);
Arguments
"error.html.twig"
array:7 [
"errorcode" => 8192
"error" => "realpath(): Passing null to parameter #1 ($path) of type string is deprecated"
"debug" => false
"backtrace" => null
"theme" => GantryTheme {#787}
"site" => Gantry\Framework\Site {#875}
"joomla" => Gantry\Framework\Platform {#836}
]
* @param string $directory The name of the template
* @param string $filename The actual filename
*
* @return string The contents of the template
*
* @since 1.7.0
*/
protected function _loadTemplate($directory, $filename)
{
$contents = '';
// Check to see if we have a valid template file
if (is_file($directory . '/' . $filename))
{
// Store the file path
$this->_file = $directory . '/' . $filename;
// Get the file content
ob_start();
require $directory . '/' . $filename;
$contents = ob_get_contents();
ob_end_clean();
}
return $contents;
}
/**
* Fetch the template, and initialise the params
*
* @param array $params Parameters to determine the template
*
* @return HtmlDocument instance of $this to allow chaining
*
* @since 1.7.0
*/
protected function _fetchTemplate($params = array())
{
// Check
$directory = $params['directory'] ?? 'templates';
Arguments
"/www/a/i/u68802/public_html/_sub/test/templates/g5_helium/error.php"
$file = 'index.php';
}
}
}
// Load the language file for the template
$lang = CmsFactory::getLanguage();
// 1.5 or core then 1.6
$lang->load('tpl_' . $template, JPATH_BASE)
|| ($inherits !== '' && $lang->load('tpl_' . $inherits, $directory . '/' . $inherits))
|| $lang->load('tpl_' . $template, $directory . '/' . $template);
// Assign the variables
$this->baseurl = Uri::base(true);
$this->params = $params['params'] ?? new Registry;
$this->template = $template;
// Load
$this->_template = $this->_loadTemplate($baseDir, $file);
return $this;
}
/**
* Parse a document template
*
* @return HtmlDocument instance of $this to allow chaining
*
* @since 1.7.0
*/
protected function _parseTemplate()
{
$matches = array();
if (preg_match_all('#<jdoc:include\ type="([^"]+)"(.*)\/>#iU', $this->_template, $matches))
{
$messages = [];
$template_tags_first = [];
$template_tags_last = [];
Arguments
"/www/a/i/u68802/public_html/_sub/test/templates/g5_helium"
"error.php"
$options['title'] = $args[3] ?? null;
}
parent::$_buffer[$options['type']][$options['name']][$options['title']] = $content;
return $this;
}
/**
* Parses the template and populates the buffer
*
* @param array $params Parameters for fetching the template
*
* @return HtmlDocument instance of $this to allow chaining
*
* @since 1.7.0
*/
public function parse($params = array())
{
return $this->_fetchTemplate($params)->_parseTemplate();
}
/**
* Outputs the template to the browser.
*
* @param boolean $caching If true, cache the output
* @param array $params Associative array of attributes
*
* @return string The rendered data
*
* @since 1.7.0
*/
public function render($caching = false, $params = array())
{
$this->_caching = $caching;
if (empty($this->_template))
{
$this->parse($params);
}
Arguments
array:7 [
"template" => "g5_helium"
"directory" => "/www/a/i/u68802/public_html/_sub/test/templates"
"debug" => false
"csp_nonce" => "NGY2YzY3MTZmYWU0ZDkyMTBmMDNjODdjY2UyZjU1OTkzNzY0ZTA4OGE2NDAwOWMxMWRmYWU2ZGM4NTM3MzYwZDA4ZjVhODJmOTAwZjI1OWE3OTAwOTQyN2ZkNDNmNzI3OGZlMmQ4MDIxNDIzNzk2NWY0MjA5NGNjMjJlOTI0MmI="
"templateInherits" => ""
"params" => Joomla\Registry\Registry {#800}
"file" => "error.php"
]
return $this->_fetchTemplate($params)->_parseTemplate();
}
/**
* Outputs the template to the browser.
*
* @param boolean $caching If true, cache the output
* @param array $params Associative array of attributes
*
* @return string The rendered data
*
* @since 1.7.0
*/
public function render($caching = false, $params = array())
{
$this->_caching = $caching;
if (empty($this->_template))
{
$this->parse($params);
}
if (\array_key_exists('csp_nonce', $params) && $params['csp_nonce'] !== null)
{
$this->cspNonce = $params['csp_nonce'];
}
$data = $this->_renderTemplate();
parent::render($caching, $params);
return $data;
}
/**
* Count the modules in the given position
*
* @param string $positionName The position to use
* @param boolean $withContentOnly Count only a modules which actually has a content
*
* @return integer Number of modules found
Arguments
array:7 [
"template" => "g5_helium"
"directory" => "/www/a/i/u68802/public_html/_sub/test/templates"
"debug" => false
"csp_nonce" => "NGY2YzY3MTZmYWU0ZDkyMTBmMDNjODdjY2UyZjU1OTkzNzY0ZTA4OGE2NDAwOWMxMWRmYWU2ZGM4NTM3MzYwZDA4ZjVhODJmOTAwZjI1OWE3OTAwOTQyN2ZkNDNmNzI3OGZlMmQ4MDIxNDIzNzk2NWY0MjA5NGNjMjJlOTI0MmI="
"templateInherits" => ""
"params" => Joomla\Registry\Registry {#800}
"file" => "error.php"
]
{
$status = 500;
}
$errorReporting = CmsFactory::getApplication()->get('error_reporting');
if ($errorReporting === "development" || $errorReporting === "maximum")
{
$status .= ' ' . str_replace("\n", ' ', $this->_error->getMessage());
}
CmsFactory::getApplication()->setHeader('status', $status);
// Set variables
$this->debug = $params['debug'] ?? false;
$this->error = $this->_error;
$params['file'] = 'error.php';
return parent::render($cache, $params);
}
/**
* Render the backtrace
*
* @return string The contents of the backtrace
*
* @since 1.7.0
*/
public function renderBacktrace()
{
// If no error object is set return null
if (!isset($this->_error))
{
return;
}
// The back trace
$backtrace = $this->_error->getTrace();
Arguments
false
array:7 [
"template" => "g5_helium"
"directory" => "/www/a/i/u68802/public_html/_sub/test/templates"
"debug" => false
"csp_nonce" => "NGY2YzY3MTZmYWU0ZDkyMTBmMDNjODdjY2UyZjU1OTkzNzY0ZTA4OGE2NDAwOWMxMWRmYWU2ZGM4NTM3MzYwZDA4ZjVhODJmOTAwZjI1OWE3OTAwOTQyN2ZkNDNmNzI3OGZlMmQ4MDIxNDIzNzk2NWY0MjA5NGNjMjJlOTI0MmI="
"templateInherits" => ""
"params" => Joomla\Registry\Registry {#800}
"file" => "error.php"
]
{
$wa->addTemplateRegistryFile($template->parent, $app->getClientId());
}
if (ob_get_contents())
{
ob_end_clean();
}
$this->getDocument()->setTitle(Text::_('Error') . ': ' . $error->getCode());
return $this->getDocument()->render(
false,
[
'template' => $template->template,
'directory' => JPATH_THEMES,
'debug' => JDEBUG,
'csp_nonce' => $app->get('csp_nonce'),
'templateInherits' => $template->parent,
'params' => $template->params,
]
);
}
}
Arguments
false
array:7 [
"template" => "g5_helium"
"directory" => "/www/a/i/u68802/public_html/_sub/test/templates"
"debug" => false
"csp_nonce" => "NGY2YzY3MTZmYWU0ZDkyMTBmMDNjODdjY2UyZjU1OTkzNzY0ZTA4OGE2NDAwOWMxMWRmYWU2ZGM4NTM3MzYwZDA4ZjVhODJmOTAwZjI1OWE3OTAwOTQyN2ZkNDNmNzI3OGZlMmQ4MDIxNDIzNzk2NWY0MjA5NGNjMjJlOTI0MmI="
"templateInherits" => ""
"params" => Joomla\Registry\Registry {#800}
"file" => "error.php"
]
else
{
$format = $app->input->getString('format', 'html');
}
try
{
$renderer = AbstractRenderer::getRenderer($format);
}
catch (\InvalidArgumentException $e)
{
// 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);
$data = $renderer->render($error);
// If nothing was rendered, just use the message from the Exception
if (empty($data))
{
$data = $error->getMessage();
}
if ($isCli)
{
echo $data;
}
else
{
/** @var CMSApplication $app */
// Do not allow cache
$app->allowCache(false);
$app->setBody($data);
}
Arguments
Whoops\Exception\ErrorException {#1145
#message: "realpath(): Passing null to parameter #1 ($path) of type string is deprecated"
#code: 8192
#file: "/www/a/i/u68802/public_html/_sub/test/libraries/gantry5/vendor/twig/twig/src/Loader/FilesystemLoader.php"
#line: 40
#severity: E_DEPRECATED
}
}
}
// Always return false, this will tell PHP to handle the error internally
return false;
}
/**
* Handles exceptions: logs errors and renders error page.
*
* @param \Exception|\Throwable $error An Exception or Throwable (PHP 7+) object for which to render the error page.
*
* @return void
*
* @since 3.10.0
*/
public static function handleException(\Throwable $error)
{
static::logException($error);
static::render($error);
}
/**
* Render the error page based on an exception.
*
* @param \Throwable $error An Exception or Throwable (PHP 7+) object for which to render the error page.
*
* @return void
*
* @since 3.0
*/
public static function render(\Throwable $error)
{
try
{
$app = Factory::getApplication();
// Flag if we are on cli
$isCli = $app->isClient('cli');
Arguments
Whoops\Exception\ErrorException {#1145
#message: "realpath(): Passing null to parameter #1 ($path) of type string is deprecated"
#code: 8192
#file: "/www/a/i/u68802/public_html/_sub/test/libraries/gantry5/vendor/twig/twig/src/Loader/FilesystemLoader.php"
#line: 40
#severity: E_DEPRECATED
}
// Trigger the onAfterCompress event.
$this->triggerEvent('onAfterCompress');
}
}
catch (\Throwable $throwable)
{
/** @var ErrorEvent $event */
$event = AbstractEvent::create(
'onError',
[
'subject' => $throwable,
'eventClass' => ErrorEvent::class,
'application' => $this,
]
);
// Trigger the onError event.
$this->triggerEvent('onError', $event);
ExceptionHandler::handleException($event->getError());
}
// Send the application response.
$this->respond();
// Trigger the onAfterRespond event.
$this->triggerEvent('onAfterRespond');
}
/**
* Check if the user is required to reset their password.
*
* If the user is required to reset their password will be redirected to the page that manage the password reset.
*
* @param string $option The option that manage the password reset
* @param string $view The view that manage the password reset
* @param string $layout The layout of the view that manage the password reset
* @param string $tasks Permitted tasks
*
* @return void
Arguments
Whoops\Exception\ErrorException {#1145
#message: "realpath(): Passing null to parameter #1 ($path) of type string is deprecated"
#code: 8192
#file: "/www/a/i/u68802/public_html/_sub/test/libraries/gantry5/vendor/twig/twig/src/Loader/FilesystemLoader.php"
#line: 40
#severity: E_DEPRECATED
}
*/
class FilesystemLoader implements LoaderInterface, ExistsLoaderInterface, SourceContextLoaderInterface
{
/** Identifier of the main namespace. */
const MAIN_NAMESPACE = '__main__';
protected $paths = [];
protected $cache = [];
protected $errorCache = [];
private $rootPath;
/**
* @param string|array $paths A path or an array of paths where to look for templates
* @param string|null $rootPath The root path common to all relative paths (null for getcwd())
*/
public function __construct($paths = [], $rootPath = null)
{
$this->rootPath = (null === $rootPath ? getcwd() : $rootPath).\DIRECTORY_SEPARATOR;
if (false !== $realPath = realpath($rootPath)) {
$this->rootPath = $realPath.\DIRECTORY_SEPARATOR;
}
if ($paths) {
$this->setPaths($paths);
}
}
/**
* Returns the paths to the templates.
*
* @param string $namespace A path namespace
*
* @return array The array of paths where to look for templates
*/
public function getPaths($namespace = self::MAIN_NAMESPACE)
{
return isset($this->paths[$namespace]) ? $this->paths[$namespace] : [];
}
Arguments
"realpath(): Passing null to parameter #1 ($path) of type string is deprecated"
*/
class FilesystemLoader implements LoaderInterface, ExistsLoaderInterface, SourceContextLoaderInterface
{
/** Identifier of the main namespace. */
const MAIN_NAMESPACE = '__main__';
protected $paths = [];
protected $cache = [];
protected $errorCache = [];
private $rootPath;
/**
* @param string|array $paths A path or an array of paths where to look for templates
* @param string|null $rootPath The root path common to all relative paths (null for getcwd())
*/
public function __construct($paths = [], $rootPath = null)
{
$this->rootPath = (null === $rootPath ? getcwd() : $rootPath).\DIRECTORY_SEPARATOR;
if (false !== $realPath = realpath($rootPath)) {
$this->rootPath = $realPath.\DIRECTORY_SEPARATOR;
}
if ($paths) {
$this->setPaths($paths);
}
}
/**
* Returns the paths to the templates.
*
* @param string $namespace A path namespace
*
* @return array The array of paths where to look for templates
*/
public function getPaths($namespace = self::MAIN_NAMESPACE)
{
return isset($this->paths[$namespace]) ? $this->paths[$namespace] : [];
}
Arguments
/** @var Config $global */
$global = $gantry['global'];
$cachePath = $global->get('compile_twig', 1) ? $this->getCachePath('twig') : null;
if ($cachePath) {
/** @phpstan-ignore-next-line */
if (Environment::VERSION_ID > 3) {
// Twig 3 support.
$cache = new FilesystemCache($cachePath, FilesystemCache::FORCE_BYTECODE_INVALIDATION);
/** @phpstan-ignore-next-line */
} else {
$cache = new TwigCacheFilesystem($cachePath, FilesystemCache::FORCE_BYTECODE_INVALIDATION);
}
} else {
$cache = null;
}
$debug = $gantry->debug();
$production = (bool) $global->get('production', 1);
$loader = new FilesystemLoader();
$params = [
'cache' => $cache,
'debug' => $debug,
'auto_reload' => !$production,
'autoescape' => 'html'
];
$twig = new Environment($loader, $params);
$this->setTwigLoaderPaths($loader);
if ($debug) {
$twig->addExtension(new DebugExtension());
}
$this->renderer = $this->extendTwig($twig, $loader);
}
return $this->renderer;
}
$this->renderer = $this->extendTwig($twig, $loader);
}
return $this->renderer;
}
/**
* Render a template file by using given context.
*
* @param string $file
* @param array $context
* @return string
*/
public function render($file, array $context = [])
{
// Include Gantry specific things to the context.
$context = $this->getContext($context);
return $this->renderer()->render($file, $context);
}
/**
* Compile and render twig string.
*
* @param string $string
* @param array $context
* @return string
*/
public function compile($string, array $context = [])
{
$renderer = $this->renderer();
$template = $renderer->createTemplate($string);
// Include Gantry specific things to the context.
$context = $this->getContext($context);
return $template->render($context);
}
// Bootstrap Gantry framework or fail gracefully (inside included file).
$className = __DIR__ . '/custom/includes/gantry.php';
if (!is_file($className)) {
$className = __DIR__ . '/includes/gantry.php';
}
$gantry = include $className;
/** @var Platform $joomla */
$joomla = $gantry['platform'];
$joomla->document = $this;
/** @var Theme $theme */
$theme = $gantry['theme'];
// All the custom twig variables can be defined in here:
$context = array();
// Render the page.
echo $theme->render('index.html.twig', $context);
Arguments
"index.html.twig"
array:3 [
"theme" => GantryTheme {#787}
"site" => Gantry\Framework\Site {#875}
"joomla" => Gantry\Framework\Platform {#836}
]
* @param string $directory The name of the template
* @param string $filename The actual filename
*
* @return string The contents of the template
*
* @since 1.7.0
*/
protected function _loadTemplate($directory, $filename)
{
$contents = '';
// Check to see if we have a valid template file
if (is_file($directory . '/' . $filename))
{
// Store the file path
$this->_file = $directory . '/' . $filename;
// Get the file content
ob_start();
require $directory . '/' . $filename;
$contents = ob_get_contents();
ob_end_clean();
}
return $contents;
}
/**
* Fetch the template, and initialise the params
*
* @param array $params Parameters to determine the template
*
* @return HtmlDocument instance of $this to allow chaining
*
* @since 1.7.0
*/
protected function _fetchTemplate($params = array())
{
// Check
$directory = $params['directory'] ?? 'templates';
Arguments
"/www/a/i/u68802/public_html/_sub/test/templates/g5_helium/index.php"
$file = 'index.php';
}
}
}
// Load the language file for the template
$lang = CmsFactory::getLanguage();
// 1.5 or core then 1.6
$lang->load('tpl_' . $template, JPATH_BASE)
|| ($inherits !== '' && $lang->load('tpl_' . $inherits, $directory . '/' . $inherits))
|| $lang->load('tpl_' . $template, $directory . '/' . $template);
// Assign the variables
$this->baseurl = Uri::base(true);
$this->params = $params['params'] ?? new Registry;
$this->template = $template;
// Load
$this->_template = $this->_loadTemplate($baseDir, $file);
return $this;
}
/**
* Parse a document template
*
* @return HtmlDocument instance of $this to allow chaining
*
* @since 1.7.0
*/
protected function _parseTemplate()
{
$matches = array();
if (preg_match_all('#<jdoc:include\ type="([^"]+)"(.*)\/>#iU', $this->_template, $matches))
{
$messages = [];
$template_tags_first = [];
$template_tags_last = [];
Arguments
"/www/a/i/u68802/public_html/_sub/test/templates/g5_helium"
"index.php"
$options['title'] = $args[3] ?? null;
}
parent::$_buffer[$options['type']][$options['name']][$options['title']] = $content;
return $this;
}
/**
* Parses the template and populates the buffer
*
* @param array $params Parameters for fetching the template
*
* @return HtmlDocument instance of $this to allow chaining
*
* @since 1.7.0
*/
public function parse($params = array())
{
return $this->_fetchTemplate($params)->_parseTemplate();
}
/**
* Outputs the template to the browser.
*
* @param boolean $caching If true, cache the output
* @param array $params Associative array of attributes
*
* @return string The rendered data
*
* @since 1.7.0
*/
public function render($caching = false, $params = array())
{
$this->_caching = $caching;
if (empty($this->_template))
{
$this->parse($params);
}
Arguments
array:6 [
"template" => "g5_helium"
"file" => "index.php"
"params" => Joomla\Registry\Registry {#800}
"csp_nonce" => "NGY2YzY3MTZmYWU0ZDkyMTBmMDNjODdjY2UyZjU1OTkzNzY0ZTA4OGE2NDAwOWMxMWRmYWU2ZGM4NTM3MzYwZDA4ZjVhODJmOTAwZjI1OWE3OTAwOTQyN2ZkNDNmNzI3OGZlMmQ4MDIxNDIzNzk2NWY0MjA5NGNjMjJlOTI0MmI="
"templateInherits" => null
"directory" => "/www/a/i/u68802/public_html/_sub/test/templates"
]
{
// Setup the document options.
$this->docOptions['template'] = $this->get('theme');
$this->docOptions['file'] = $this->get('themeFile', 'index.php');
$this->docOptions['params'] = $this->get('themeParams');
$this->docOptions['csp_nonce'] = $this->get('csp_nonce');
$this->docOptions['templateInherits'] = $this->get('themeInherits');
if ($this->get('themes.base'))
{
$this->docOptions['directory'] = $this->get('themes.base');
}
// Fall back to constants.
else
{
$this->docOptions['directory'] = \defined('JPATH_THEMES') ? JPATH_THEMES : (\defined('JPATH_BASE') ? JPATH_BASE : __DIR__) . '/themes';
}
// Parse the document.
$this->document->parse($this->docOptions);
// Trigger the onBeforeRender event.
PluginHelper::importPlugin('system');
$this->triggerEvent('onBeforeRender');
$caching = false;
if ($this->isClient('site') && $this->get('caching') && $this->get('caching', 2) == 2 && !Factory::getUser()->get('id'))
{
$caching = true;
}
// Render the document.
$data = $this->document->render($caching, $this->docOptions);
// Set the application output data.
$this->setBody($data);
// Trigger the onAfterRender event.
$this->triggerEvent('onAfterRender');
Arguments
array:6 [
"template" => "g5_helium"
"file" => "index.php"
"params" => Joomla\Registry\Registry {#800}
"csp_nonce" => "NGY2YzY3MTZmYWU0ZDkyMTBmMDNjODdjY2UyZjU1OTkzNzY0ZTA4OGE2NDAwOWMxMWRmYWU2ZGM4NTM3MzYwZDA4ZjVhODJmOTAwZjI1OWE3OTAwOTQyN2ZkNDNmNzI3OGZlMmQ4MDIxNDIzNzk2NWY0MjA5NGNjMjJlOTI0MmI="
"templateInherits" => null
"directory" => "/www/a/i/u68802/public_html/_sub/test/templates"
]
}
if (!is_dir(JPATH_THEMES . '/' . $template->template) && !$this->get('offline'))
{
$this->set('themeFile', 'component.php');
}
// Ensure themeFile is set by now
if ($this->get('themeFile') == '')
{
$this->set('themeFile', $file . '.php');
}
// Pass the parent template to the state
$this->set('themeInherits', $template->parent);
break;
}
parent::render();
}
/**
* Route the application.
*
* Routing is the process of examining the request environment to determine which
* component should receive the request. The component optional parameters
* are then set in the request object to be processed when the application is being
* dispatched.
*
* @return void
*
* @since 3.2
*/
protected function route()
{
// Execute the parent method
parent::route();
$Itemid = $this->input->getInt('Itemid', null);
* @return void
*
* @since 3.2
*/
public function execute()
{
try
{
$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();
}
// If gzip compression is enabled in configuration and the server is compliant, compress the output.
if ($this->get('gzip') && !ini_get('zlib.output_compression') && ini_get('output_handler') !== 'ob_gzhandler')
{
$this->compress();
// Trigger the onAfterCompress event.
$this->triggerEvent('onAfterCompress');
}
}
catch (\Throwable $throwable)
{
/** @var ErrorEvent $event */
$event = AbstractEvent::create(
'onError',
[
'subject' => $throwable,
'eventClass' => ErrorEvent::class,
'application' => $this,
*
* In addition to aliasing "common" service keys, we also create aliases for the PHP classes to ensure autowiring objects
* is supported. This includes aliases for aliased class names, and the keys for aliased class names should be considered
* deprecated to be removed when the class name alias is removed as well.
*/
$container->alias('session.web', 'session.web.site')
->alias('session', 'session.web.site')
->alias('JSession', 'session.web.site')
->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.
$app->execute();
if (version_compare(PHP_VERSION, JOOMLA_MINIMUM_PHP, '<'))
{
die(
str_replace(
'{{phpversion}}',
JOOMLA_MINIMUM_PHP,
file_get_contents(dirname(__FILE__) . '/templates/system/incompatible.html')
)
);
}
/**
* Constant that is checked in included files to prevent direct access.
* 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';
Arguments
"/www/a/i/u68802/public_html/_sub/test/includes/app.php"