*/
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;
}