| Linux hosting5.siteguarding.com 3.10.0-962.3.2.lve1.5.88.el7.x86_64 #1 SMP Fri Sep 26 14:06:42 UTC 2025 x86_64 Path : /home/devsafetybis/op4103.dev.safetybis.com/admin1qw/controller/event/ |
| Current File : /home/devsafetybis/op4103.dev.safetybis.com/admin1qw/controller/event/debug.php |
<?php
namespace Opencart\Admin\Controller\Event;
/**
* Class Debug
*
* @package Opencart\Admin\Controller\Event
*/
class Debug extends \Opencart\System\Engine\Controller {
/**
* Before
*
* @param string $route
* @param array<int, mixed> $args
*
* @return void
*/
public function before(string &$route, array &$args): void {
if ($route == 'common/home') { // Add the route you want to test
//$this->session->data['debug'][$route] = microtime();
}
}
/**
* After
*
* @param string $route
* @param array<int, mixed> $args
* @param mixed $output
*
* @return void
*/
public function after(string $route, array &$args, &$output): void {
if ($route == 'common/home') {
// add the route you want to test
if (isset($this->session->data['debug'][$route])) {
$log_data = [
'route' => $route,
'time' => microtime() - $this->session->data['debug'][$route]
];
$this->log->write($route);
}
}
}
}