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; } }
public function __destruct() { parent::__destruct(); }