Example #1
0
 public function scrape_CFG()
 {
     /*preg_match_all('/<!--<seperate((?: {|{)(?:.*?)})(.*?)<!--<\/seperate>-->/s', $content, $matches);
     		//---------------------------------------------------------
     		if (sizeof($matches[0]) > 0) {
     			$this->css_CFG(NULL, $matches[2][0], json_decode($matches[1][0], true));
     			//-----------------------------------------------------
     			$content = str_replace($matches[0][0], "", $content);
     			//-----------------------------------------------------
     		}*/
     $this->tags = array();
     //---------------------------------------------------------
     $output_updated = $this->output_markup = Compiler::markUp_CHK($this->output, array("ignore" => true, "replace" => true));
     //$output_updated = StringUtil::removeAllHtmlComments($output_updated);
     //---------------------------------------------------------
     preg_match_all($this->regex, $output_updated, $matches, PREG_SET_ORDER);
     //---------------------------------------------------------
     $this->matches = $matches;
     //---------------------------------------------------------
     foreach ($matches as $key => $match) {
         $save_dir = $this->save_dir;
         //-----------------------------------------------------
         $prop = array("forceDownload" => $this->forceDownload, "compileType" => $this->compileType, "compilePath" => $this->compilePath, "compilerGlobal" => $this->compilerGlobal, "minify" => $this->minify, "save_dir" => $save_dir, "defaultSavePath" => $this->defaultSavePath, "output" => $this->output_updated, "match" => $match, "imagesProp" => $this->imagesProp, "index" => $key, "onRemoveMatch" => $this->onRemoveMatch, "src_path" => $this->src_path);
         //-----------------------------------------------------
         $newMatch = ClassUtil::classFromString($this->matchClass, array(ArrayUtil::array_replace_recursive($prop, $this->matchProp)));
         $newMatch->init();
         //-----------------------------------------------------
         $this->output_updated = $newMatch->output_updated;
         //-----------------------------------------------------
         if (!is_null($newMatch->link)) {
             if ($this->saveasphp) {
                 $this->mergedCode .= $newMatch->content_updated;
             } else {
                 //$this->extLinks .= $newMatch->link;
             }
         } else {
             //if (is_null($this->compilerGlobal->mergedCode)) $this->compilerGlobal->mergedCode = "";
             if (!is_null($newMatch->content_updated)) {
                 if ($newMatch->tagType != "tmpl") {
                     $this->mergedCode_noTag .= PHP_EOL . $newMatch->content_updated;
                     $this->mergedCode .= "<" . $newMatch->tagType . ">" . PHP_EOL . $newMatch->content_updated . "</" . $newMatch->tagType . ">";
                 } else {
                     $this->mergedCode .= PHP_EOL . $newMatch->content_updated;
                 }
             }
         }
         //-----------------------------------------------------
         $this->tags[] = $newMatch;
     }
     //---------------------------------------------------------
     //$this->output_updated = $output_updated;
 }
Example #2
0
$class = explode("/", $class[sizeof($class) - 2]);
//----------------------------------------------------------
$class = end($class);
//----------------------------------------------------------
require_once $classPath;
//----------------------------------------------------------
if (isset($_OBJ['staticClass']) && $_OBJ['staticClass'] == "true" && is_null(Constants::$conn)) {
    GenFun::hostConnect();
}
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//init
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//----------------------------------------------------------
$object = !isset($_OBJ['staticClass']) ? ClassUtil::classFromString($class) : $class;
//----------------------------------------------------------
$object = SetPublicProp::findObj($object, $_OBJ['functionName']);
//----------------------------------------------------------
$orig_functionName = $_OBJ['functionName'];
//----------------------------------------------------------
$_OBJ['functionName'] = $object['string'];
//----------------------------------------------------------
$object = $object['class'];
//----------------------------------------------------------
//if (!file_exists($classPath) && is_null($object)) die($classPath." does not exist!!!!");
//----------------------------------------------------------
if (isset($_OBJ['prop'])) {
    SetPublicProp::go($object, $_OBJ['prop']);
}
//----------------------------------------------------------