/** Resolves the path from the logic in the Name class which resolves via folder lookup, and then the default directory */
10
final class NameAndFolderResolveTemplatePath implements ResolveTemplatePath
11
{
12
public function __invoke(Name $name): string {
13
$path = $name->getPath();
14
if (is_file($path)) {
15
return $path;
16
}
17
18
throw new TemplateNotFound($name->getName(), [$name->getPath()], 'The template "' . $name->getName() . '" could not be found at "' . $name->getPath() . '".');