|
static | display_global () |
| for development , show GLOBAL and SESSION More...
|
|
static | display_request () |
| for development , show request (POST, GET) More...
|
|
static | display_size () |
| display a bar depending of the size of the screen , it helps for CSS to see the media-size More...
|
|
static | echo_file ($msg, $print=true) |
| display the file More...
|
|
static | echo_function ($msg, $print=true) |
| returns a string , for the function with a specific style More...
|
|
static | echo_var ($n_level, $msg, $print=true) |
| Display the value of a var if DEBUGNOALYSS is greater than $n_level, the debugging info has a certain formatting. More...
|
|
static | hidden_info ($p_title, $msg) |
| Show a icon to display large information on demand, when you click it , the content will be showned. More...
|
|
static | timer_show () |
| stop the timer and show the elapsed time, it is used for optimising the code More...
|
|
static | timer_start () |
| start a timer More...
|
|
Definition at line 35 of file dbg.php.
◆ display_global()
static Noalyss\Dbg::display_global |
( |
| ) |
|
|
static |
for development , show GLOBAL and SESSION
- Returns
- void
Definition at line 148 of file dbg.php.
149 {
150 $id = uniqid(
"debug");
152 ?>
153 <div
class=
" col-10 inner_box" style=
"display:none" id=
"<?= $id ?>">
155 $GLOBALS
156 <pre><?= print_r($GLOBALS) ?></pre>
157
159 </div>
160 <input
type=
"button" onclick=
"document.getElementById('<?= $id ?>').show();" value=
"Show session">
161 <?php
162 }
References $id, $title, HtmlInput\button_hide(), style, HtmlInput\title_box(), type, and value.
◆ display_request()
static Noalyss\Dbg::display_request |
( |
| ) |
|
|
static |
for development , show request (POST, GET)
- Returns
- void
Definition at line 119 of file dbg.php.
120 {
121 $id = uniqid(
"debug");
123 ?>
124 <div
class=
" col-10 inner_box" style=
"display:none" id=
"<?= $id ?>">
126
127 <
h2 style=
"margin-top:100px"> Memory Usage
128 <?php echo round(memory_get_usage() / 1024.0, 2) . " kb \n"; ?>
131 <pre><?php echo print_r(
$_POST) ?></pre>
133 <pre><?= print_r(
$_GET) ?></pre>
136 $_FILES
137 <pre><?= print_r($_FILES) ?></pre>
139 </div>
140 <input
type=
"button" onclick=
"document.getElementById('<?= $id ?>').show();" value=
"Show request">
141 <?php
142 }
h2($p_string, $p_class="", $raw="")
References $_GET, $_POST, $_REQUEST, $id, $title, HtmlInput\button_hide(), h2(), style, HtmlInput\title_box(), type, and value.
◆ display_size()
static Noalyss\Dbg::display_size |
( |
| ) |
|
|
static |
display a bar depending of the size of the screen , it helps for CSS to see the media-size
- Returns
- void
Definition at line 104 of file dbg.php.
105 {
106 echo <<<EOF
107<div
class=
"d-block d-sm-none " style=
"background-color:lightblue">Xtra Small</div>
108<div
class=
"d-none d-sm-block d-md-none d-lg-none d-xl-none " style=
"background-color:red">Small</div>
109<div
class=
"d-none d-md-block d-lg-none " style=
"background-color:orangered">Medium</div>
110<div
class=
"d-none d-lg-block d-xl-none " style=
"background-color:orange">Large</div>
111<div
class=
"d-none d-xl-block " style=
"background-color:wheat">X Large</div>
112EOF;
113 }
References style.
◆ echo_file()
static Noalyss\Dbg::echo_file |
( |
|
$msg, |
|
|
|
$print = true |
|
) |
| |
|
static |
display the file
- Parameters
-
$msg | name of file , usually always FILE |
$print | if true display , otherwise returns a string |
- Returns
- string|void
Definition at line 88 of file dbg.php.
89 {
90 if (DEBUGNOALYSS > 1) {
91 $r =
'<span style="font-size:12px;color:brown;background-color:lightyellow;display:table-row">';
93
95 if ($print) { echo
$r;}
97 }
98 }
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
References $r.
◆ echo_function()
static Noalyss\Dbg::echo_function |
( |
|
$msg, |
|
|
|
$print = true |
|
) |
| |
|
static |
returns a string , for the function with a specific style
- Parameters
-
$msg | function name FUNCTION or CLASS |
$print | if true display , otherwise returns a string |
- Returns
- string|void
Definition at line 70 of file dbg.php.
71 {
72 if (DEBUGNOALYSS > 1) {
73 $r =
'<span style="font-size:12px;color:brown;background-color:bisque;">';
75
77 if ($print) { echo
$r;}
79 }
80 }
References $r.
◆ echo_var()
static Noalyss\Dbg::echo_var |
( |
|
$n_level, |
|
|
|
$msg, |
|
|
|
$print = true |
|
) |
| |
|
static |
Display the value of a var if DEBUGNOALYSS is greater than $n_level, the debugging info has a certain formatting.
- Parameters
-
$n_level | integer if greater than DEBUGNOALYSS, the variable will be displaid |
$msg | value to display : could be an object array, .. |
$print | if true display , otherwise returns a string |
- Returns
- string|void
Definition at line 45 of file dbg.php.
46 {
47 if (DEBUGNOALYSS > $n_level) {
48 $r=
'<span style="font-size:12px;color:orangered;background-color:lightyellow;margin:1rem;border:1px black dashed">';
50 if (in_array(
$type, [
"string",
"integer",
"double"])) {
52 } else {
53
57 }
59 if ($print) { echo
$r;}
61 }
62 }
References $msg, $r, and $type.
Referenced by Acc_Ledger_Purchase\insert(), Extension\insert_profile_menu(), and contact\Summary().
◆ hidden_info()
static Noalyss\Dbg::hidden_info |
( |
|
$p_title, |
|
|
|
$msg |
|
) |
| |
|
static |
Show a icon to display large information on demand, when you click it , the content will be showned.
- Parameters
-
string | $p_title | title of the dialog box |
mixed | $msg | var_export of the msg |
- Returns
- string HTML to display
Definition at line 170 of file dbg.php.
171 {
175
178<div
id=
"{$id}_infodiv" style=
"display: none;background:rgba(234, 221, 114, 0.66);color:black;font-size:80%;width:auto;">
180<div>
181<pre>
183
184</pre>
185</div>
186{$button_close}
187</div>
188<a href="javascript:void(0)" onclick="$('{$id}_infodiv').show()">🕶</a>
189
190EOF;
192 }
References $content, $id, $msg, $r, $title, HtmlInput\button_hide(), style, and HtmlInput\title_box().
◆ timer_show()
static Noalyss\Dbg::timer_show |
( |
| ) |
|
|
static |
stop the timer and show the elapsed time, it is used for optimising the code
- Returns
- void
Definition at line 208 of file dbg.php.
209 {
210 global $timer;
211
212 echo '<span style="font-size:80%;color:navy;background:lightgreen">';
213 echo _("Temps écoulé : ");
214 echo (hrtime(true)-$timer)/1e+6;
215 echo '</span>';
216 }
◆ timer_start()
static Noalyss\Dbg::timer_start |
( |
| ) |
|
|
static |
start a timer
- Returns
- void
Definition at line 198 of file dbg.php.
199 {
200 global $timer;
201 $timer=hrtime(true);
202 }
The documentation for this class was generated from the following file: