Exemple #1
0
 public function matchContent_CFG()
 {
     $this->markup_CFG();
     //--------------------------------------------------
     if (!is_null($this->link_compile_file) && !is_null($this->link_compile_file->link)) {
         $this->link = $this->link_compile_file->link;
         /*//--------------------------------------------------
         		if ($this->saveasphp) {
         			$this->content = $link;
         		}*/
     }
     if ($this->minify && !preg_match_all("/\\.min/", $this->file) && !is_null($this->content) && $this->tagType != "tmpl") {
         $this->content_updated = Minifier_v0::minify(array("type" => $this->codeType, "code" => $this->content_updated));
     }
     /*else {
     			$this->content_updated = $this->content;
     		}*/
     //------------------------------------------------------
 }
Exemple #2
0
 public function getFileContent($type, $index, $minify)
 {
     $content = NULL;
     if ($this->isPropSet($this->code[$type], "forceDownload", true) && $index['forced']) {
         $index['content'] = file_get_contents($index["file"]);
         $content = $this->compiler->getFiles($index["content"], $index["file"]);
         //if (!is_null($index['ex'])) $this->content = str_replace($index['ex'], '', $this->content);
     } else {
         if ($index['forced']) {
             $content = $this->getExtLink($index['file']);
         } else {
             $content = $index['content'];
         }
     }
     if ($minify && !preg_match_all("/\\.min/", $index["file"]) && isset($index['content'])) {
         //krumo($type);
         //krumo($index);
         //krumo($content);
         $content = Minifier_v0::minify(array("type" => $type, "code" => $content));
         if ($type == "css") {
             $content = "<style>" . PHP_EOL . $content . PHP_EOL . "</style>";
         } else {
             if ($type == "js") {
                 $content = "<script>" . PHP_EOL . $content . PHP_EOL . "</script>";
             }
         }
     }
     //---------------------------------------------------------
     //krumo($content);
     return $content . PHP_EOL;
 }