public function after($controller, $metadata, &$data) { if ($metadata->or_ajax == 'true') { $ismobile = Request::is_ajax(); } else { $ismobile = Dispatcher::RequestType() == 'mobile' && Request::is_ajax(); } if ($ismobile) { if ($metadata->key) { $data = $data[$metadata->key]; } $data = Model::Flatten($data); echo json_encode($data); die; } }
<?php if (Dispatcher::RequestType() != 'html' || defined('DISABLE_TRACE')) { return; } $finaltime = microtime(true) - Collector::$start_time; $result = ob_get_clean(); echo $result; $finalsize = strlen($result) / 1024; $modules = array(); foreach (Config::$environment_config->collector->modules->items as $key => $module) { uses($module); $class = $key . 'DebugModule'; $modules[$key] = new $class(); } if ($finaltime < 0.9) { $status = '<span style="color:green">✔</span>'; } else { if ($finaltime < 1.2) { $status = '<span style="color:orange">✔</span>'; } else { $status = '<span style="color:red">✖</span>'; } } ?> <link rel="stylesheet" href="<?php echo Config::$environment_config->inspector->stylesheet; ?> " type="text/css" /> <script type="text/javascript" src="<?php