/** * Return template for response body * * @param string $currentDir * @param string | null $viewName * @param array | null $data * * @return string */ protected function getTemplate($currentDir, $data = null, $viewName = null) { $viewName = $viewName ? $viewName : $this->getViewName(); $path = $currentDir . $this->viewsDir . $this->getViewsFolderName() . $viewName . '.lex'; $content = file_get_contents($path); if (!$content) { die("Parse file error ('{$path}')"); } return $this->parser->parse($content, $data); }
private function parseLex($template, $vars = array()) { $parser = new Parser(); return $parser->parse(file_get_contents('../skin/' . $template . '.lex' . (file_exists('../skin/' . $template . '.lex') ? NULL : '.dist')), $vars); }
public static function injectNoparse($template) { \Lex\Parser::injectNoparse($template); }