3declare(strict_types=1);
38 self::$use_var_dump = $bUseVarDump;
66 mixed $something_to_display =
"",
68 string|
null $css_class =
null,
69 bool|
null $useVarDump =
null
72 if (is_null($something_to_display))
74 $something_to_display =
"The value is NULL!";
78 $useVarDumpParam = is_bool($useVarDump)
83 $sReturnVal =
"\n<".$tag.(null === $css_class ?
"" :
" class='".$css_class.
"'").
">\n";
86 ? var_dump($something_to_display)
87 : print_r($something_to_display)
89 $sReturnVal .= ob_get_clean();
90 $sReturnVal .=
"\n</".$tag.
">\n";
122 mixed $something_to_display =
"",
124 string|
null $css_class =
null,
125 bool|
null $useVarDump =
null
128 if (is_null($something_to_display))
130 $something_to_display =
"The value is NULL!";
133 $useVarDumpParam = is_bool($useVarDump)
139 $backtrace = debug_backtrace();
140 $sOriginInfo =
"<none>";
141 if (isset($backtrace[0][
'file']))
143 $sFormated =
"<b>Location: %s ->Line %s</b>\n<br>";
144 $sOriginInfo = sprintf(
146 str_replace(LEPTON_PATH,
"~", $backtrace[0][
'file']),
147 $backtrace[0][
'line']
152 $s =
"\n<".$tag.(null === $css_class ?
"" :
" class='".$css_class.
"'").
">\n";
156 ? var_dump($something_to_display)
157 : print_r($something_to_display)
159 $s .= ob_get_clean();
160 $s .=
"\n</".$tag.
">\n";
179 static function base64ToImage(
string $base64_string,
string $output_file): string
181 $file = fopen($output_file,
"wb");
183 $data = explode(
',', $base64_string);
185 fwrite($file, base64_decode($data[1]));