Commit 35e52e8e by Frederick d. Maus
2 parents 38e05d03 7df4628d
Showing with 23 additions and 4 deletions
...@@ -82,6 +82,8 @@ class D { ...@@ -82,6 +82,8 @@ class D {
if(trim($param_string)) { if(trim($param_string)) {
if($param_htmlentities)
$param_string=htmlentities($param_string);
self::$echo_lines[self::$echo_count] = array( self::$echo_lines[self::$echo_count] = array(
'line' => $param_string, 'line' => $param_string,
'print' => $param_print, 'print' => $param_print,
...@@ -94,13 +96,25 @@ class D { ...@@ -94,13 +96,25 @@ class D {
} }
} }
/**
* function htmlencode a string or array values ()
*
* @param array/string $param_val
*/
public static function htmlencode_arrayvalues($param_val){
if(is_array($param_val)){
foreach($param_val as $key => $value){
$param_val[$key]=self::htmlencode_arrayvalues($value);
};
return $param_val;
}
return htmlentities($param_val);
}
/** /**
* Funktion zeigt ein Objekt/Array html strukturiert an * Funktion zeigt ein Objekt/Array html strukturiert an
* anstelle von var_dump * anstelle von var_dump
*/ */
public static function show($param_val, $param_string="", $param_print=true, $param_force=false) { public static function show($param_val, $param_string="", $param_print=true, $param_force=false, $param_htmlentities=false) {
// self::new_echo("<br>______________________<br>", $param_print, $param_force); // self::new_echo("<br>______________________<br>", $param_print, $param_force);
...@@ -118,7 +132,12 @@ class D { ...@@ -118,7 +132,12 @@ class D {
} }
// self::new_echo("<pre>", $param_print, $param_force); // self::new_echo("<pre>", $param_print, $param_force);
$string_show .= "<pre>"; $string_show .= "<pre>";
if($param_htmlentities){
$param_val=self::htmlencode_arrayvalues($param_val);
}
self::new_echo($string_show.print_r($param_val, true).'"</pre>"', $param_print, $param_force); self::new_echo($string_show.print_r($param_val, true).'"</pre>"', $param_print, $param_force);
//echo '#############################'.print_r($param_val, true).'####################'; //echo '#############################'.print_r($param_val, true).'####################';
// if(is_object($param_val)) { // if(is_object($param_val)) {
// self::new_echo("<b>show(Objekt/Klassen Variablen)</b><pre>", $param_print, $param_force); // self::new_echo("<b>show(Objekt/Klassen Variablen)</b><pre>", $param_print, $param_force);
...@@ -184,7 +203,7 @@ class D { ...@@ -184,7 +203,7 @@ class D {
* <ul><li>$param_string</li></ul> * <ul><li>$param_string</li></ul>
*/ */
public static function ulli($param_string, $param_print=true, $param_force=false) { public static function ulli($param_string, $param_print=true, $param_force=false) {
// self::printCurrentFunction($param_print); self::printCurrentFunction($param_print);
self::new_echo("<ul><li>".$param_string."</li></ul>", $param_print, $param_force); self::new_echo("<ul><li>".$param_string."</li></ul>", $param_print, $param_force);
} }
/** /**
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!