Esempio n. 1
0
 public function invoke()
 {
     if ($this->componentFile === null) {
         $this->componentFile = $this->getViewComponentDefaultView();
     }
     $razr = new Engine(new FilesystemLoader(), BASE_DIR . "/Views/.cache");
     echo $razr->render($this->componentFile, $this->registeredVariables);
 }
Esempio n. 2
0
 public function printView($filePath)
 {
     if (!FileSystem::exists(BASE_DIR . "/Views/.cache")) {
         FileSystem::makeDirectory(BASE_DIR . "/Views/.cache");
     }
     $razr = new Engine(new FileSystemLoader(), BASE_DIR . "/Views/.cache");
     $page = new \stdClass();
     $page->title = $this->title;
     $page->author = $this->author;
     $page->metaContent = $this->metaContent;
     $this->registeredVariables["MetaPageDetails"] = $page;
     echo $razr->render($filePath, $this->registeredVariables);
 }