Exemple #1
0
 public function update($event, $val = null)
 {
     switch ($event) {
         case Render::CHUNK:
         case Render::STANDALONE:
         case Render::VERBOSE:
             parent::update($event, $val);
             break;
         case Render::INIT:
             $this->setOutputDir(Config::output_dir() . strtolower($this->getFormatName()) . '/');
             $this->postConstruct();
             if (file_exists($this->getOutputDir())) {
                 if (!is_dir($this->getOutputDir())) {
                     v("Output directory is a file?", E_USER_ERROR);
                 }
             } else {
                 if (!mkdir($this->getOutputDir(), 0777, true)) {
                     v("Can't create output directory", E_USER_ERROR);
                 }
             }
             if (Config::css()) {
                 $this->fetchStylesheet();
             }
             break;
     }
 }
Exemple #2
0
 public function __destruct()
 {
     parent::__destruct();
 }