stupid, but necessary

This commit is contained in:
Alex Grintsvayg 2016-09-05 10:21:52 -04:00
parent 864e43ee68
commit 164f8da8f2

View file

@ -21,16 +21,16 @@ class View
public static function render($template, array $vars = [])
{
if (!static::exists($template) || substr_count($template, '/') !== 1)
{
throw new InvalidArgumentException(sprintf('The template "%s" does not exist or is unreadable.', $template));
}
if (static::isMarkdown($template))
{
return static::markdownToHtml(static::getFullPath($template));
}
if (!static::exists($template) || substr_count($template, '/') !== 1)
{
throw new InvalidArgumentException(sprintf('The template "%s" does not exist or is unreadable.', $template));
}
list($module, $view) = explode('/', $template);
$isPartial = $view[0] === '_';