Cml\Service\FastRoute::rest PHP Method

rest() public method

增加REST方式路由
public rest ( string $pattern, string | array $action )
$pattern string 路由规则
$action string | array 执行的操作
    public function rest($pattern, $action)
    {
        is_array($action) ? $action['__rest'] = 1 : ($action = ['__rest' => 0, '__action' => $action]);
        $this->addRoute($this->httpMethod, $pattern, $action);
        return $this;
    }