Take templates from inside .phar if dir doesn't exist
This commit is contained in:
parent
3b9307c84d
commit
5d6dc9a8b1
@ -15,6 +15,11 @@ class Template
|
||||
*/
|
||||
public function __construct($base, $theme)
|
||||
{
|
||||
// Use templates from the phar archive if the templates dir doesn't exist.
|
||||
if (!is_dir($base)) {
|
||||
$base = 'phar://daux.phar/templates';
|
||||
}
|
||||
|
||||
// Create new Plates instance
|
||||
$this->engine = new Engine($base);
|
||||
if (!is_dir($theme)) {
|
||||
|
Loading…
Reference in New Issue
Block a user