4 * Interface for template source locators.
6 * A locator is a way to retrieve a PHPTAL template source otherwhere than in
9 * The default behavour of this class is to act like a file system locator.
11 * @author Laurent Bedubourg <laurent.bedubourg@free.fr>
13 class PHPTAL_SourceLocator
17 function PHPTAL_SourceLocator($path)
23 * Returns an absolute path to this resource.
25 * The result of this method is used to generate some unique
26 * md5 value which represent the template php function name
27 * and the intermediate php file name.
37 * Return source last modified date in a filemtime format.
39 * The result is compared to php intermediate mtime to decide
40 * weither or not to re-parse the template source.
44 function lastModified()
46 return filemtime($this->path
);
50 * Return the template source.
52 * This method is invoqued if the template has to be parsed.
58 return join('', file($this->path
));