Cml\Service\Route::rest PHP Method

rest() public method

增加REST方式路由
public rest ( string $pattern, string | array $action )
$pattern string 路由规则
$action string | array 执行的操作
    public function rest($pattern, $action)
    {
        self::$rules[self::REST_ROUTE . self::patternFactory($pattern)] = $action;
        return $this;
    }