sharedData, $data);
$template = file_get_contents($path);
if (is_array($data)) {
foreach ($data as $name => $content) {
$template = str_replace('%' . $name . '%', $content, $template);
}
}
return $template;
}
/**
* @param string $path
* @return bool
*/
public function canRender(string $path): bool
{
return mb_strpos($path, '.htm') !== false && file_exists($path);
}
}