/** * 获取当前的控制器的相关信息 * * @return string */ public static function controller($type = 'name') { switch ($type) { case 'name': case 'filename': $return = empty(self::$controller) ? 'index' : self::$controller; break; case 'path': case 'filepath': $return = module::setting(Router::module(), 'root') . DS . router::application() . DS . router::controller('filename') . '.php'; break; case 'class': case 'classname': $return = empty(self::$controller) ? 'IndexController' : ucfirst(self::$controller) . 'Controller'; break; } return $return; }
public static function module($id = '') { $id = empty($id) ? router::module() : $id; return module::setting($id, 'url'); }