/home/www/www.boilingbolt.com/system/src/Grav/Common/Twig/Twig.php
try {
$output = $this->twig->render($template, $twig_vars);
} catch (\Twig_Error_Loader $e) {
$error_msg = $e->getMessage();
// Try html version of this template if initial template was NOT html
if ($ext != '.html' . TWIG_EXT) {
try {
$output = $this->twig->render($page->template() . '.html' . TWIG_EXT, $twig_vars);
} catch (\Twig_Error_Loader $e) {
throw new \RuntimeException($error_msg, 400, $e);
}
} else {
throw new \RuntimeException($error_msg, 400, $e);
}
}
return $output;
}
/**
Arguments
-
"Template "error.png.twig" is not defined."
/home/www/www.boilingbolt.com/vendor/twig/twig/lib/Twig/Loader/Chain.php
}
try {
return $loader->getCacheKey($name);
} catch (Twig_Error_Loader $e) {
$exceptions[] = get_class($loader).': '.$e->getMessage();
}
}
throw new Twig_Error_Loader(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : ''));
}
/**
* {@inheritdoc}
*/
public function isFresh($name, $time)
{
$exceptions = array();
foreach ($this->loaders as $loader) {
if ($loader instanceof Twig_ExistsLoaderInterface && !$loader->exists($name)) {
Arguments
"Template "error.html.twig" is not defined."
/home/www/www.boilingbolt.com/vendor/twig/twig/lib/Twig/Environment.php
* * Whether the Twig C extension is available or not.
*
* @param string $name The name for which to calculate the template class name
* @param int|null $index The index if it is an embedded template
*
* @return string The template class name
*/
public function getTemplateClass($name, $index = null)
{
$key = $this->getLoader()->getCacheKey($name);
$key .= json_encode(array_keys($this->extensions));
$key .= function_exists('twig_template_get_attributes');
return $this->templateClassPrefix.hash('sha256', $key).(null === $index ? '' : '_'.$index);
}
/**
* Gets the template class prefix.
*
* @return string The template class prefix
Arguments
/home/www/www.boilingbolt.com/vendor/twig/twig/lib/Twig/Environment.php
* @param int $index The index if it is an embedded template
*
* @return Twig_TemplateInterface A template instance representing the given template name
*
* @throws Twig_Error_Loader When the template cannot be found
* @throws Twig_Error_Syntax When an error occurred during compilation
*/
public function loadTemplate($name, $index = null)
{
$cls = $this->getTemplateClass($name, $index);
if (isset($this->loadedTemplates[$cls])) {
return $this->loadedTemplates[$cls];
}
if (!class_exists($cls, false)) {
if ($this->bcGetCacheFilename) {
$key = $this->getCacheFilename($name);
} else {
$key = $this->cache->generateKey($name, $cls);
Arguments
/home/www/www.boilingbolt.com/vendor/twig/twig/lib/Twig/Environment.php
*
* @return string The rendered template
*
* @throws Twig_Error_Loader When the template cannot be found
* @throws Twig_Error_Syntax When an error occurred during compilation
* @throws Twig_Error_Runtime When an error occurred during rendering
*/
public function render($name, array $context = array())
{
return $this->loadTemplate($name)->render($context);
}
/**
* Displays a template.
*
* @param string $name The template name
* @param array $context An array of parameters to pass to the template
*
* @throws Twig_Error_Loader When the template cannot be found
* @throws Twig_Error_Syntax When an error occurred during compilation
Arguments
/home/www/www.boilingbolt.com/system/src/Grav/Common/Twig/Twig.php
$template = $this->template($page->template() . $ext);
try {
$output = $this->twig->render($template, $twig_vars);
} catch (\Twig_Error_Loader $e) {
$error_msg = $e->getMessage();
// Try html version of this template if initial template was NOT html
if ($ext != '.html' . TWIG_EXT) {
try {
$output = $this->twig->render($page->template() . '.html' . TWIG_EXT, $twig_vars);
} catch (\Twig_Error_Loader $e) {
throw new \RuntimeException($error_msg, 400, $e);
}
} else {
throw new \RuntimeException($error_msg, 400, $e);
}
}
return $output;
}
Arguments
"error.html.twig"
array:20 [
"config" => Config {}
"uri" => Uri {}
"base_dir" => "/home/www/www.boilingbolt.com"
"base_url" => ""
"base_url_simple" => ""
"base_url_absolute" => "https://www.boilingbolt.com"
"base_url_relative" => ""
"theme_dir" => "/home/www/www.boilingbolt.com/user/themes/big-picture"
"theme_url" => "/user/themes/big-picture"
"site" => array:8 [
"title" => "Boiling Bolt"
"author" => array:2 [
"name" => "Jeremie Thomas"
"email" => "jthomas@persistant.fr"
]
"taxonomies" => array:4 [
0 => "video game"
1 => "twin stick shooter"
2 => "shoot them up"
3 => null
]
"metadata" => array:1 [
"description" => "Boiling bolt. A 2.5D twin stick shooter powered by astonishing PopcornFX technology and UE4"
]
"summary" => array:4 [
"enabled" => true
"format" => "short"
"size" => 300
"delimiter" => "==="
]
"redirects" => null
"routes" => null
"blog" => array:1 [
"route" => "/blog"
]
]
"assets" => Assets {}
"taxonomy" => Taxonomy {}
"browser" => Browser {}
"form" => null
"form_json_response" => []
"pages" => Page {}
"page" => Page {}
"header" => {}
"media" => Media {}
"content" => "<p>Woops. Looks like this page doesn't exist.</p>"
]
/home/www/www.boilingbolt.com/system/src/Grav/Common/Service/OutputServiceProvider.php
use Pimple\Container;
use Pimple\ServiceProviderInterface;
class OutputServiceProvider implements ServiceProviderInterface
{
public function register(Container $container) {
$container['output'] = function ($c) {
/** @var Grav $c */
return $c['twig']->processSite($c['uri']->extension());
};
}
}
Arguments
/home/www/www.boilingbolt.com/vendor/pimple/pimple/src/Pimple/Container.php
) {
return $this->values[$id];
}
if (isset($this->factories[$this->values[$id]])) {
return $this->values[$id]($this);
}
$raw = $this->values[$id];
$val = $this->values[$id] = $raw($this);
$this->raw[$id] = $raw;
$this->frozen[$id] = true;
return $val;
}
/**
* Checks if a parameter or an object is set.
*
Arguments
/home/www/www.boilingbolt.com/system/src/Grav/Common/Processors/RenderProcessor.php
namespace Grav\Common\Processors;
class RenderProcessor extends ProcessorBase implements ProcessorInterface {
public $id = 'render';
public $title = 'Render';
public function process() {
$this->container->output = $this->container['output'];
$this->container->fireEvent('onOutputGenerated');
}
}
Arguments
/home/www/www.boilingbolt.com/system/src/Grav/Common/Grav.php
public function process()
{
/** @var Debugger $debugger */
$debugger = $this['debugger'];
// process all processors (e.g. config, initialize, assets, ..., render)
foreach ($this->processors as $processor) {
$processor = $this[$processor];
$this->measureTime($processor->id, $processor->title, function () use ($processor) {
$processor->process();
});
}
// Set the header type
$this->header();
echo $this->output;
$debugger->render();
$this->fireEvent('onOutputRendered');
/home/www/www.boilingbolt.com/system/src/Grav/Common/Grav.php
$container['debugger'] = new Debugger();
$debugger = $container['debugger'];
// closure that measures time by wrapping a function into startTimer and stopTimer
// The debugger can be passed to the closure. Should be more performant
// then to get it from the container all time.
$container->measureTime = function ($timerId, $timerTitle, $callback) use ($debugger) {
$debugger->startTimer($timerId, $timerTitle);
$callback();
$debugger->stopTimer($timerId);
};
$container->measureTime('_services', 'Services', function () use ($container) {
$container->registerServices($container);
});
return $container;
}
/home/www/www.boilingbolt.com/system/src/Grav/Common/Grav.php
/**
* Magic Catch All Function
* Used to call closures like measureTime on the instance.
* Source: http://stackoverflow.com/questions/419804/closures-as-class-members
*/
public function __call($method, $args)
{
$closure = $this->$method;
call_user_func_array($closure, $args);
}
/**
* Initialize and return a Grav instance
*
* @param array $values
*
* @return static
*/
protected static function load(array $values)
Arguments
"render"
"Render"
Closure {
class: "Grav\Common\Grav"
this: Grav { …}
use: {
$processor: RenderProcessor {}
}
file: "/home/www/www.boilingbolt.com/system/src/Grav/Common/Grav.php"
line: "120 to 122"
}
/home/www/www.boilingbolt.com/system/src/Grav/Common/Grav.php
/**
* Magic Catch All Function
* Used to call closures like measureTime on the instance.
* Source: http://stackoverflow.com/questions/419804/closures-as-class-members
*/
public function __call($method, $args)
{
$closure = $this->$method;
call_user_func_array($closure, $args);
}
/**
* Initialize and return a Grav instance
*
* @param array $values
*
* @return static
*/
protected static function load(array $values)
Arguments
Closure {
class: "Grav\Common\Grav"
parameters: {
$timerId: {}
$timerTitle: {}
$callback: {}
}
use: {
$debugger: Debugger {}
}
file: "/home/www/www.boilingbolt.com/system/src/Grav/Common/Grav.php"
line: "394 to 398"
}
array:3 [
0 => "render"
1 => "Render"
2 => Closure {
class: "Grav\Common\Grav"
this: Grav { …}
use: {
$processor: RenderProcessor {}
}
file: "/home/www/www.boilingbolt.com/system/src/Grav/Common/Grav.php"
line: "120 to 122"
}
]
/home/www/www.boilingbolt.com/system/src/Grav/Common/Grav.php
{
/** @var Debugger $debugger */
$debugger = $this['debugger'];
// process all processors (e.g. config, initialize, assets, ..., render)
foreach ($this->processors as $processor) {
$processor = $this[$processor];
$this->measureTime($processor->id, $processor->title, function () use ($processor) {
$processor->process();
});
}
// Set the header type
$this->header();
echo $this->output;
$debugger->render();
$this->fireEvent('onOutputRendered');
Arguments
"measureTime"
array:3 [
0 => "render"
1 => "Render"
2 => Closure {
class: "Grav\Common\Grav"
this: Grav { …}
use: {
$processor: RenderProcessor {}
}
file: "/home/www/www.boilingbolt.com/system/src/Grav/Common/Grav.php"
line: "120 to 122"
}
]
/home/www/www.boilingbolt.com/index.php
// Get the Grav instance
$grav = Grav::instance(
array(
'loader' => $loader
)
);
// Process the page
try {
$grav->process();
} catch (\Exception $e) {
$grav->fireEvent('onFatalException', new Event(['exception' => $e]));
throw $e;
}