public function __construct()
 {
     global $THEME;
     // make sure cache/compile paths exist
     check_dir_exists(get_config('dataroot') . 'dwoo/compile/' . $THEME->basename);
     check_dir_exists(get_config('dataroot') . 'dwoo/cache/' . $THEME->basename);
     // set paths
     $this->template_dir = $THEME->templatedirs;
     $compileDir = get_config('dataroot') . 'dwoo/compile/' . $THEME->basename;
     $cacheDir = get_config('dataroot') . 'dwoo/cache/' . $THEME->basename;
     parent::__construct($compileDir, $cacheDir);
     // add plugins dir to the loader
     $this->getLoader()->addDirectory(get_config('libroot') . 'dwoo/mahara/plugins/');
     // adds mahara resources and compiler factory
     $this->setDefaultCompilerFactory('file', array($this, 'compilerFactory'));
     $this->addResource('artefact', 'Dwoo_Template_Mahara_Artefact', array($this, 'compilerFactory'));
     $this->addResource('blocktype', 'Dwoo_Template_Mahara_Blocktype', array($this, 'compilerFactory'));
     $this->addResource('export', 'Dwoo_Template_Mahara_Export', array($this, 'compilerFactory'));
     $this->addResource('interaction', 'Dwoo_Template_Mahara_Interaction', array($this, 'compilerFactory'));
     // set base data
     $theme_list = array();
     $themepaths = themepaths();
     foreach ($themepaths['mahara'] as $themepath) {
         $theme_list[$themepath] = $THEME->get_url($themepath);
     }
     $this->_data = array('THEME' => $THEME, 'WWWROOT' => get_config('wwwroot'), 'THEMELIST' => json_encode($theme_list), 'HTTPSWWWROOT' => get_config('httpswwwroot'));
 }
 /**
  * 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");
 }
Exemple #3
0
 public function __construct()
 {
     $cache_path = CAT_PATH . '/temp/cache';
     if (!file_exists($cache_path)) {
         mkdir($cache_path, 0755, true);
     }
     $compiled_path = CAT_PATH . '/temp/compiled';
     if (!file_exists($compiled_path)) {
         mkdir($compiled_path, 0755, true);
     }
     parent::__construct($compiled_path, $cache_path);
     // we need our own logger instance here as the driver does not
     // inherit from CAT_Object
     if (!class_exists('CAT_Helper_KLogger', false)) {
         include dirname(__FILE__) . '/../../../framework/CAT/Helper/KLogger.php';
     }
     $this->logger = new CAT_Helper_KLogger(CAT_PATH . '/temp/logs', $this->debuglevel);
 }
Exemple #4
0
 /**
  * Constructor
  *
  */
 public function __construct()
 {
     $compile_dir = FW_CACHE_DIR . '/dwoo_compiled';
     parent::__construct($compile_dir);
 }
Exemple #5
0
 public function __construct()
 {
     parent::__construct();
     $this->data = new Dwoo_Data();
 }