* beyond are used.
*/
public static $theme = [
- 'sourcename' => '',
'videowidth' => 425,
'videoheight' => 350,
'stylesheet' => '',
*/
public static function replaceMacros(string $template, array $vars = [])
{
- $stamp1 = microtime(true);
+ DI::profiler()->startRecording('rendering');
// pass $baseurl to all templates if it isn't set
$vars = array_merge(['$baseurl' => DI::baseUrl()->get(), '$APP' => DI::app()], $vars);
throw new InternalServerErrorException($message);
}
- DI::profiler()->saveTimestamp($stamp1, "rendering");
+ DI::profiler()->stopRecording();
return $output;
}
*/
public static function getMarkupTemplate($file, $subDir = '')
{
- $stamp1 = microtime(true);
+ DI::profiler()->startRecording('file');
$t = self::getTemplateEngine();
try {
throw new InternalServerErrorException($message);
}
- DI::profiler()->saveTimestamp($stamp1, "file");
+ DI::profiler()->stopRecording();
return $template;
}
} else {
$a = DI::app();
$class = self::$template_engines[$template_engine];
- $obj = new $class($a->getCurrentTheme(), $a->theme_info);
+ $obj = new $class($a->getCurrentTheme(), $a->getThemeInfo());
self::$template_engine_instance[$template_engine] = $obj;
return $obj;
}