Exemple #1
0
 public function __construct($step, View $contentView = null)
 {
     $tempDirectory = Module::getTempDirectory();
     parent::__construct(self::TEMPLATE, $tempDirectory);
     $this->set('step', $step);
     $this->set('locale', I18n::getInstance()->getLocale()->getCode());
     if ($contentView) {
         $this->setSubview('content', $contentView);
     }
     $this->addStyle(self::STYLE);
 }
 /**
  * Read the configuration values for a section
  * @param string $section name of the section to read
  * @return array Hierarchic array with each configuration token as a key
  * @throws zibo\library\config\exception\ConfigException when the section name is invalid or empty
  */
 public function read($section)
 {
     $values = parent::read($section);
     switch ($section) {
         case 'smarty':
             if (!array_key_exists('compile', $values)) {
                 $values['compile'] = array();
             }
             $values['compile']['directory'] = Module::getTempDirectory('smarty')->getPath();
             break;
         case 'system':
             if (!array_key_exists('session', $values)) {
                 $values['session'] = array();
             }
             $values['session']['path'] = Module::getTempDirectory('session')->getPath();
             break;
     }
     return $values;
 }
Exemple #3
0
<?php

use zibo\install\Module;
$module = new Module();
$module->initialize();