Ejemplo n.º 1
0
 public function __construct($dir = "templates", $templatePath = "templates")
 {
     $root = Sylph\Shared::getRoot();
     $this->dir = $root . $dir . "/";
     $this->templatePath = $templatePath . "/";
     $this->order[] = "default";
 }
Ejemplo n.º 2
0
 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";
     });
 }