public function group($namespace, callable $func) { if (empty($namespace)) { throw new \InvalidArgumentException(Lang::get('_NOT_ALLOW_EMPTY_', '$namespace')); } self::$group = trim($namespace, '/'); $func(); self::$group = false; }