当前位置: 首页>>代码示例>>PHP>>正文


PHP Dwoo::__construct方法代码示例

本文整理汇总了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'));
 }
开发者ID:richardmansfield,项目名称:richardms-mahara,代码行数:27,代码来源:Dwoo_Mahara.php

示例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");
 }
开发者ID:johnny-s,项目名称:itsplanned.com,代码行数:22,代码来源:Dwootemplate.php

示例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);
 }
开发者ID:ircoco,项目名称:BlackCatCMS,代码行数:18,代码来源:DwooDriver.php

示例4: __construct

 /**
  * Constructor
  *
  */
 public function __construct()
 {
     $compile_dir = FW_CACHE_DIR . '/dwoo_compiled';
     parent::__construct($compile_dir);
 }
开发者ID:apeschar,项目名称:php-fw,代码行数:9,代码来源:FWTemplate.class.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     $this->data = new Dwoo_Data();
 }
开发者ID:rudiedirkx,项目名称:CMS1,代码行数:5,代码来源:inc.cls.mydwoo.php


注:本文中的Dwoo::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。