Exemple #1
0
 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);
 }
Exemple #2
0
 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;
 }
Exemple #3
0
 /**
  * @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);
 }
Exemple #4
0
 public static function display(array $vars = array(), $dirTpl = null)
 {
     $tplObj = new Tpl($dirTpl);
     return $tplObj->addVars($vars)->getTpl();
 }