本文整理汇总了PHP中Dwoo::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Dwoo::__construct方法的具体用法?PHP Dwoo::__construct怎么用?PHP Dwoo::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dwoo
的用法示例。
在下文中一共展示了Dwoo::__construct方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
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'));
}
示例2: __construct
/**
* 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");
}
示例3: __construct
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);
}
示例4: __construct
/**
* Constructor
*
*/
public function __construct()
{
$compile_dir = FW_CACHE_DIR . '/dwoo_compiled';
parent::__construct($compile_dir);
}
示例5: __construct
public function __construct()
{
parent::__construct();
$this->data = new Dwoo_Data();
}