public function __handle() { $this->meta_description = ""; $this->meta_keywords = ""; $this->meta_robots = "NOINDEX,NOFOLLOW"; $this->link_canonical = Ac::router()->directoryUrl(); if (Ac::response()->isSuccessful()) { Ac::response()->status(404); } $this->body(func_num_args() > 0 ? print_r(func_get_arg(0), true) : "<html><head></head><body><h1>" . Ac::response()->getStatusMessage() . "</h1></body></html>"); }
<tr> <th>current module</th> <td><?php echo App::module()->name(); ?> </td> </tr> <tr> <th>loaded modules</th> <td><?php echo implode(", ", array_keys(Ac::loader()->getModules())); ?> </td> </tr> <?php $vars = Ac::router()->toArray(); foreach ($vars as $i => $v) { if ($i == "controllerInstance") { continue; } if ($i == "resource") { $v = '[' . implode(",", $v) . ']'; } if ($i == "params") { $v = '[' . implode(",", $v) . ']'; } ?> <tr> <th><?php echo $i; ?>
/** * Get / Set the router * @param Ac_Router $router The new router * @return Ac_Router */ public static function &router(Ac_Router &$router = null) { if (!empty($router)) { self::$router = $router; } return self::$router; }