for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Bonfim\Tpl;
class Content
{
public static function getContent(string $view): string
$view = str_replace('.', '/', $view);
$file = Tpl::getDir() . "$view.php";
if (!file_exists($file)) {
throw new \Exception("$file template not found"); // @codeCoverageIgnore
}
return file_get_contents($file);