Cml\Service\FastRoute::group PHP Method

group() public method

分组路由
public group ( string $namespace, callable $func )
$namespace string 分组名
$func callable 闭包
    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;
    }