/** * Constructor * * @param pstl PHPSTL * @param path string trailing slashes are not needed and will be stripped */ public function __construct(PHPSTL $pstl, $path, $suffix = '.xml') { $path = realpath($path); if ($path === false || !is_dir($path)) { throw new RuntimeException("no such directory {$path}"); } parent::__construct($pstl); $this->path = $path; $this->suffix = $suffix; }
protected function createTemplate($resource, $data, $identifier = null) { return parent::createTemplate($resource, $data, 'file://' . CurrentPath::get() . '/' . $resource); }