if (file_exists($filename)) { $handle = fopen($filename, "r"); $fSize = filesize($filename); if ($fSize > 0) { $live_breaking_news1 = fread($handle, $fSize); $live_breaking_news = json_decode($live_breaking_news1, true, 512, JSON_THROW_ON_ERROR); } fclose($handle); } // flush out any stray output that might get out before an error occurs or // an exception is thrown. This prevents any partial views from leaking. try { $this->files->getRequire($path, $data); } catch (Throwable $e) { $this->handleViewException($e, $obLevel); } return ltrim(ob_get_clean()); } // Once we have the path to the compiled file, we will evaluate the paths with // typical PHP just like any other templates. We also keep a stack of views // which have been rendered for right exception messages to be generated. try { $results = $this->evaluatePath($this->compiler->getCompiledPath($path), $data); } catch (ViewException $e) { if (! str($e->getMessage())->contains(['No such file or directory', 'File does not exist at path'])) { throw $e; } * * @return string */ protected function getContents() { return $this->engine->get($this->path, $this->gatherData()); }...
Read More