Beispiel #1
0
 static function varToJs($var)
 {
     $var = trim($var, '$');
     $var = str_replace("']['", ".", $var);
     $var = str_replace("\"][\"", ".", $var);
     $var = str_replace("['", ".", $var);
     $var = str_replace("[\"", ".", $var);
     $var = str_replace("']", "", $var);
     $var = str_replace("\"]", "", $var);
     $var = str_replace("[\$", "[", $var);
     $var = "data." . $var;
     $var = PhpToJs::replace($var);
     return $var;
 }
Beispiel #2
0
 function __toString()
 {
     PhpToJs::popVar();
     PhpToJs::popVar();
     return " '';}}\nreturn " . OUTPUT_VAR . ";\n})(data) ";
 }