Exemple #1
0
 public function __construct($compileDir = null, $cacheDir = null)
 {
     parent::__construct($compileDir, $cacheDir);
     // get current working directory
     $callstack = debug_backtrace();
     $this->workdir = isset($callstack[0]) && isset($callstack[0]['file']) ? realpath(dirname($callstack[0]['file'])) : realpath(dirname(__FILE__));
     if (file_exists($this->workdir . '/templates')) {
         $this->setPath($this->workdir . '/templates');
     }
 }
Exemple #2
0
 /**
  * private constructor; use getInstance() to load this class
  **/
 public function __construct($options = array())
 {
     parent::__construct($options);
     if (!isset($options['lang'])) {
         if (defined('LANGUAGE')) {
             $options['lang'] = LANGUAGE;
         }
     }
     if (isset($options['lang'])) {
         self::$_current_lang = $options['lang'];
     }
     if (!is_object($this->_path)) {
         $this->_path = CAT_Helper_Directory::getInstance();
     }
     $this->init();
 }