| 1: | <?php
|
| 2: | namespace Opencart\Admin\Controller\Event;
|
| 3: | |
| 4: | |
| 5: | |
| 6: | |
| 7: |
|
| 8: | class Debug extends \Opencart\System\Engine\Controller {
|
| 9: | |
| 10: | |
| 11: | |
| 12: | |
| 13: | |
| 14: | |
| 15: | |
| 16: |
|
| 17: | public function before(string &$route, array &$args): void {
|
| 18: | if ($route == 'common/home') {
|
| 19: |
|
| 20: | }
|
| 21: | }
|
| 22: |
|
| 23: | |
| 24: | |
| 25: | |
| 26: | |
| 27: | |
| 28: | |
| 29: | |
| 30: | |
| 31: |
|
| 32: | public function after(string $route, array &$args, &$output): void {
|
| 33: | if ($route == 'common/home') {
|
| 34: |
|
| 35: | if (isset($this->session->data['debug'][$route])) {
|
| 36: | $log_data = [
|
| 37: | 'route' => $route,
|
| 38: | 'time' => microtime() - $this->session->data['debug'][$route]
|
| 39: | ];
|
| 40: |
|
| 41: | $this->log->write($route);
|
| 42: | }
|
| 43: | }
|
| 44: | }
|
| 45: | }
|
| 46: | |