public function __construct($dir = "templates", $templatePath = "templates") { $root = Sylph\Shared::getRoot(); $this->dir = $root . $dir . "/"; $this->templatePath = $templatePath . "/"; $this->order[] = "default"; }
public function __construct($subDir = "") { // Sets root directory $dir = Sylph\Shared::getRoot(); // Sets subdirectory if necessary if ($subDir !== "") { $dir .= "/" . $subDir; } $this->dir = $dir; // Sets default 404 $this->add404(function ($args) { echo "404 - not found"; }); }