/** * @return mixed|null|string * @throws \Exception */ public function render() { trigger(Sphido::class . '::' . __FUNCTION__, $this->page, $this); // HTTP status code if ($code = isset($this->page->status) ? $this->page->status : null) { http_response_code($code); } // PHTML file execute if ($this->page->is('phtml')) { extract(get_object_vars($this), EXTR_SKIP); ob_start(); require $this->page; return ob_get_clean(); } return latte()->renderToString($this->page, get_object_vars($this)); }