Exemplo n.º 1
0
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->myelementmap = array_merge(parent::getDefaultElementMap(), static::getDefaultElementMap());
     $this->mytextmap = array_merge(parent::getDefaultTextMap(), static::getDefaultTextMap());
     $this->dchunk = array_merge(parent::getDefaultChunkInfo(), static::getDefaultChunkInfo());
 }
Exemplo n.º 2
0
 public function update($event, $val = null)
 {
     switch ($event) {
         case Render::CHUNK:
             $this->flags = $val;
             break;
         case Render::STANDALONE:
             if ($val) {
                 $this->registerElementMap(parent::getDefaultElementMap());
                 $this->registerTextMap(parent::getDefaultTextMap());
             }
             break;
         case Render::INIT:
             if ($val) {
                 if (!is_resource($this->getFileStream())) {
                     $filename = Config::output_dir();
                     if (Config::output_filename()) {
                         $filename .= Config::output_filename();
                     } else {
                         $filename .= strtolower($this->getFormatName()) . $this->getExt();
                     }
                     $this->postConstruct();
                     if (Config::css()) {
                         $this->fetchStylesheet();
                     }
                     $this->setFileStream(fopen($filename, "w+"));
                     fwrite($this->getFileStream(), $this->header());
                 }
             }
             break;
         case Render::VERBOSE:
             v("Starting %s rendering", $this->getFormatName(), VERBOSE_FORMAT_RENDERING);
             break;
     }
 }