public static function display(array $vars = array(), $dirTpl = null) { $path = Conf::get('app.path') . '/src/Views/Twig_Tpl/Mails/Matrices'; $tplObj = new Tpl($path); $dirTpl = $dirTpl === null ? self::DEFAULT_FILE_TPL : $dirTpl; return $tplObj->addVars($vars)->getTpl($dirTpl); }
protected static function display() { $responseType = Conf::get('routeInfo.response'); switch ($responseType) { case Conf::CLI: $response = ''; break; case Conf::GUI: $response = \Hyla\Templates\Tpl::display(self::$response, Conf::get('app.path') . "/src/Views/Twig_Tpl"); break; case 'JSON': $response = json_encode(self::$response); break; default: throw new \Exception("'{$responseType}' is not a correct type"); } echo $response; }
/** * @param array $vars * @param string $tpl * @return string */ public static function display(array $vars = array(), $dirTpl = null) { $dirTpl = $dirTpl === null ? self::DEFAULT_FILE_TPL : $dirTpl; $tplObj = new Tpl(self::PATH_TO_FORM_TPL); return $tplObj->addVars($vars)->getTpl($dirTpl); }
public static function display(array $vars = array(), $dirTpl = null) { $tplObj = new Tpl($dirTpl); return $tplObj->addVars($vars)->getTpl(); }