1: <?php
2:
3: namespace Charcoal\View\Php;
4:
5: // Parent namespace dependencies
6: use \Charcoal\View\AbstractLoader;
7: use \Charcoal\View\LoaderInterface;
8:
9: /**
10: * The PHP template loader finds a mustache php template file in directories and includes it (run as PHP).
11: */
12: class PhpLoader extends AbstractLoader implements LoaderInterface
13: {
14: /**
15: * Convert an identifier to a file path.
16: *
17: * @param string $ident The identifier to convert.
18: * @return string
19: */
20: protected function filenameFromIdent($ident)
21: {
22: $filename = str_replace([ '\\' ], '.', $ident);
23: $filename .= '.php';
24:
25: return $filename;
26: }
27: }
28: