Exemple #1
0
 public function start()
 {
     //---------------------------------------------------------
     $GET = array_merge($_GET, array());
     //---------------------------------------------------------
     unset($GET["pageID"]);
     //---------------------------------------------------------
     unset($GET['refresh']);
     //---------------------------------------------------------
     $_COOKIE['compile_curl'] = 1;
     //---------------------------------------------------------
     $this->url .= strpos($this->url, "?") === false ? "?" : "&";
     $this->url .= http_build_query($GET);
     //---------------------------------------------------------
     $this->output = CurlUtil::go(array("url" => $this->url));
     //---------------------------------------------------------
     $this->compile_id = Compiler::getCompile_id();
     //---------------------------------------------------------
     if ($this->useTitleAsId) {
         $this->title = $this->getTitle();
     }
     if (!is_null($this->title)) {
         $this->compile_id = $this->title;
     }
     //---------------------------------------------------------
     preg_match_all('/Fatal error(.*?)<br \\/>/s', $this->output, $errors);
     //---------------------------------------------------------
     if (sizeof($errors[0]) > 0) {
         print_r($errors[0]);
         die;
     }
     //---------------------------------------------------------
     foreach ($this->compile as $key => $value) {
         $value['compilerGlobal'] = $this->compilerGlobal;
         $value['output'] = $this->output;
         //$value['useTitleAsId'] = $this->useTitleAsId;
         $this->compilers[] = new Compile($value);
     }
     //---------------------------------------------------------
     return $this->output;
 }
Exemple #2
0
 private function index_markup_CHK($key)
 {
     $key = str_replace("{id}", Compiler::getCompile_id(), $key);
     return $key;
 }