Beispiel #1
0
 public function __construct()
 {
     if (!file_exists(static::$pathCompile)) {
         mkdir(static::$pathCompile);
     }
     if (!file_exists(static::$pathCache)) {
         mkdir(static::$pathCache);
     }
     // call parent
     parent::__construct(static::$pathCompile, static::$pathCache);
     // register template resources
     foreach (static::$templateResources as $handle => $class) {
         $this->addResource($handle, $class, array(__CLASS__, 'compilerFactory'));
     }
 }
 /**
  * Constructor for the DwooTemplate engine
  *
  */
 public function __construct()
 {
     // Call parents constructor
     parent::__construct();
     // Set the config settings
     $this->initialize();
     // Assign some defaults to dwoo
     $CI = get_instance();
     $this->dwoo_data = new Dwoo_Data();
     $this->dwoo_data->js_files = array();
     $this->dwoo_data->css_files = array();
     $this->dwoo_data->CI = $CI;
     $this->dwoo_data->site_url = $CI->config->site_url();
     // so we can get the full path to CI easily
     $this->dwoo_data->uniqid = uniqid();
     $this->dwoo_data->timestamp = mktime();
     log_message('debug', "Dwoo Template Class Initialized");
 }