|
1 | | -<?php $error_id = uniqid('error', true); ?> |
| 1 | +<?php |
| 2 | +use Config\Services; |
| 3 | +use CodeIgniter\CodeIgniter; |
| 4 | + |
| 5 | +$errorId = uniqid('error', true); |
| 6 | +?> |
2 | 7 | <!doctype html> |
3 | 8 | <html> |
4 | 9 | <head> |
|
77 | 82 | <?php if (isset($row['class'])) : ?> |
78 | 83 | — <?= esc($row['class'] . $row['type'] . $row['function']) ?> |
79 | 84 | <?php if (! empty($row['args'])) : ?> |
80 | | - <?php $args_id = $error_id . 'args' . $index ?> |
81 | | - ( <a href="#" onclick="return toggle('<?= esc($args_id, 'attr') ?>');">arguments</a> ) |
82 | | - <div class="args" id="<?= esc($args_id, 'attr') ?>"> |
| 85 | + <?php $argsId = $errorId . 'args' . $index ?> |
| 86 | + ( <a href="#" onclick="return toggle('<?= esc($argsId, 'attr') ?>');">arguments</a> ) |
| 87 | + <div class="args" id="<?= esc($argsId, 'attr') ?>"> |
83 | 88 | <table cellspacing="0"> |
84 | 89 |
|
85 | 90 | <?php |
86 | 91 | $params = null; |
87 | 92 | // Reflection by name is not available for closure function |
88 | 93 | if (substr($row['function'], -1) !== '}') { |
89 | | - $mirror = isset($row['class']) ? new \ReflectionMethod($row['class'], $row['function']) : new \ReflectionFunction($row['function']); |
| 94 | + $mirror = isset($row['class']) ? new ReflectionMethod($row['class'], $row['function']) : new ReflectionFunction($row['function']); |
90 | 95 | $params = $mirror->getParameters(); |
91 | 96 | } |
92 | 97 |
|
|
189 | 194 |
|
190 | 195 | <!-- Request --> |
191 | 196 | <div class="content" id="request"> |
192 | | - <?php $request = \Config\Services::request(); ?> |
| 197 | + <?php $request = Services::request(); ?> |
193 | 198 |
|
194 | 199 | <table> |
195 | 200 | <tbody> |
|
297 | 302 |
|
298 | 303 | <!-- Response --> |
299 | 304 | <?php |
300 | | - $response = \Config\Services::response(); |
| 305 | + $response = Services::response(); |
301 | 306 | $response->setStatusCode(http_response_code()); |
302 | 307 | ?> |
303 | 308 | <div class="content" id="response"> |
|
322 | 327 | </tr> |
323 | 328 | </thead> |
324 | 329 | <tbody> |
325 | | - <?php foreach ($headers as $name => $header) : ?> |
| 330 | + <?php foreach (array_keys($headers) as $name) : ?> |
326 | 331 | <tr> |
327 | 332 | <td><?= esc($name, 'html') ?></td> |
328 | 333 | <td><?= esc($response->getHeaderLine($name), 'html') ?></td> |
|
377 | 382 | <p> |
378 | 383 | Displayed at <?= esc(date('H:i:sa')) ?> — |
379 | 384 | PHP: <?= esc(PHP_VERSION) ?> — |
380 | | - CodeIgniter: <?= esc(\CodeIgniter\CodeIgniter::CI_VERSION) ?> |
| 385 | + CodeIgniter: <?= esc(CodeIgniter::CI_VERSION) ?> |
381 | 386 | </p> |
382 | 387 |
|
383 | 388 | </div> |
|
0 commit comments