コード例 #1
0
 /**
  * Initialize instance
  *
  * @param Charcoal_Config $config   configuration data
  */
 public function configure($config)
 {
     parent::configure($config);
     $this->debug_mode = ub($config->getBoolean('debug_mode', FALSE));
     $this->smarty->caching = 0;
     //$config->getBoolean( 'caching' )->unbox();
     $this->smarty->compile_check = ub($config->getBoolean('compile_check', FALSE));
     $this->smarty->template_dir = us($config->getString('template_dir', '', TRUE));
     $this->smarty->compile_dir = us($config->getString('compile_dir', '', TRUE));
     $this->smarty->config_dir = us($config->getString('config_dir', '', TRUE));
     $this->smarty->cache_dir = us($config->getString('cache_dir', '', TRUE));
     $this->smarty->left_delimiter = us($config->getString('left_delimiter', '{', FALSE));
     $this->smarty->right_delimiter = us($config->getString('right_delimiter', '}', FALSE));
     //        $this->smarty->default_modifiers     = $config->getArray( 'default_modifiers', array() )->unbox();
     $plugins_dir = uv($config->getArray('plugins_dir', array(), TRUE));
     // add default plugins_dir: Smarty/Smarty/plugins
     $reflector = new ReflectionClass($this->smarty);
     $plugins_dir[] = dirname($reflector->getFileName()) . '/plugins';
     $this->smarty->plugins_dir = $plugins_dir;
     log_debug("smarty", "smarty->plugins_dir=" . print_r($this->smarty->plugins_dir, true), self::TAG);
     log_debug("smarty", "smarty=" . spl_object_hash($this->smarty), self::TAG);
     if ($this->debug_mode) {
         $smarty_options = array('caching' => $this->smarty->caching, 'compile_check' => $this->smarty->compile_check, 'template_dir' => $this->smarty->template_dir, 'compile_dir' => $this->smarty->compile_dir, 'config_dir' => $this->smarty->config_dir, 'cache_dir' => $this->smarty->cache_dir, 'default_modifiers' => $this->smarty->default_modifiers, 'plugins_dir' => $this->smarty->plugins_dir, 'left_delimiter' => $this->smarty->left_delimiter, 'right_delimiter' => $this->smarty->right_delimiter);
         ad($smarty_options);
         foreach ($smarty_options as $key => $value) {
             log_debug('system, debug, smarty', "smarty option: [{$key}]=" . Charcoal_System::toString($value));
         }
     }
 }
コード例 #2
0
ファイル: TestTask.class.php プロジェクト: stk2k/charcoalphp2
 /**
  * Initialize instance
  *
  * @param Charcoal_Config $config   configuration data
  */
 public function configure($config)
 {
     parent::configure($config);
     $this->setPostActions(array('remove_event'));
     if ($this->getSandbox()->isDebug()) {
         log_debug("debug", "Task[{$this}] post actions: " . $this->getPostActions(), self::TAG);
     }
 }
コード例 #3
0
 /**
  * Initialize instance
  *
  * @param Charcoal_Config $config   configuration data
  */
 public function configure($config)
 {
     parent::configure($config);
     $this->tests = 0;
     $this->assertions = 0;
     $this->failures = 0;
     $this->section_map = array();
 }
コード例 #4
0
 /**
  * Initialize instance
  *
  * @param Charcoal_Config $config   configuration data
  */
 public function configure($config)
 {
     parent::configure($config);
     $this->setPostActions(array('remove_event', 'remove_task'));
     $this->scenario_dir = $config->getString('scenario_dir', Charcoal_ResourceLocator::getApplicationPath('scenario'), TRUE);
     if ($this->getSandbox()->isDebug()) {
         log_debug("debug,event", "Task[{$this}] post_actions: " . $this->getPostActions(), "post_actions");
         log_debug("debug,event", "scenario_dir: {$this->scenario_dir}");
     }
 }
コード例 #5
0
 /**
  * Initialize instance
  *
  * @param Charcoal_Config $config   configuration data
  */
 public function configure($config)
 {
     parent::configure($config);
 }