Shortcut to add a PATCH route for the http request method PATCH.

@param string|array    $path   for this route.
@param string|callable $handler a callback handler for the route.
@param string          $info    description of the route

@return void
352234
public function patch($path, $handler, $info = null)
    {
        $this->addRoute(["PATCH"], null, $path, $handler, $info);
    }
993886
def add_patch(self, path: str, handler: _WebHandler,
                  **kwargs: Any) -> AbstractRoute:
        
        return self.add_route(hdrs.METH_PATCH, path, handler, **kwargs)
1198959
protected function handle($handler) {
	$handler_type = $this->get_handler_type($handler);
	
	// unmatched requests
	if (empty($handler) || empty($handler_type)) {
		$exception = bootstrap::get_library('exception');
		throw new $exception('no route found', response::STATUS_NOT_FOUND);
	}
	
	// default flow: matched requests
	$this->{'load_handler_as_'.$handler_type}($handler);
}
1027347
public function addRoute($methods, string $pattern, string $handler)
    {
        if (is_string($methods)) {
            $methods = (array) $methods;
        }

        $methods = array_map('strtoupper', $methods);

        $this->routes[] = [
            $methods,
            $pattern,
            $handler
        ];
    }
1256330
public function any(string $path, $handler)
  {
    return $this->request($path, Request::HTTP_ALL, $handler);
  }
404892
public function post($pattern, $handler, array $requirements = [], array $defaults = [])
    {
        $this->addRoute('POST', $pattern, $handler, $requirements, $defaults);
    }
1240359
public static function patch($path, $callback)
    {
        self::instance()->addRoute('PATCH', $path, self::callback($callback));
    }
871802
public function patch($url, array $data = [], array $headers = [], HttpExceptionHandler $handler = null)
    {
        return $this->send('patch', $url, $data, $headers, $handler);
    }
1075314
public static void after(@NotNull String path, @NotNull Handler handler) {
        staticInstance().after(prefixPath(path), handler);
    }
1082519
public function patch( $path, callable $callback ) {
        $route = new Route( 'PATCH', $path, $callback );
        $this->_routes[] = $route;
        return $route;
    }
775889
public function all(string $path, callable $action, string $name = null): HttpRoute
    {
        return $this->handle($path, $action, ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'], $name);
    }
521889
public function route(Route $route, $handler) 
	{
		if (!is_callable($handler)) {
			throw new Exception('Route handler must be callable.');
		}

		$this->currentContext->addRoute($route, $handler);
		return $this;
	}
1089268
public static function patch(
        string $routeStr,
        array $info
    ) {
        self::create([Request::METHOD_PATCH], $routeStr, $info);
    }
1166719
public function put($pattern, $handler, array $requirements = [], array $defaults = [])
    {
        $this->addRoute('PUT', $pattern, $handler, $requirements, $defaults);
    }
871167
public function createHandler(string $path, array $info): array
    {
        $handler = $info['handler'];
        $matches = $info['matches'] ?? [];

        // is a \Closure or a callable object
        if (\is_object($handler)) {
            return [$handler, $matches];
        }

        // is array ['controller', 'action']
        if (\is_array($handler)) {
            $segments = $handler;
        } elseif (\is_string($handler)) {
            // e.g `Controllers\Home@index` Or only `Controllers\Home`
            $segments = explode('@', trim($handler));
        } else {
            App::error('Invalid route handler for URI: ' . $path);
            throw new \InvalidArgumentException('Invalid route handler for URI: ' . $path);
        }

        $action    = '';
        $className = $segments[0];
        if (isset($segments[1])) {
            // Already assign action
            $action = $segments[1];
        } elseif (isset($matches[0])) {
            // use dynamic action
            $action = array_shift($matches);
        }

        $action     = HandlerMapping::convertNodeStr($action);
        $controller = App::getBean($className);
        $handler    = [$controller, $action];

        // Set Controller and Action info to Request Context
        RequestContext::setContextData([
            'controllerClass'  => $className,
            'controllerAction' => $action ?: 'index',
        ]);

        return [$handler, $matches];
    }
327615
public function always($handler, $info = null)
    {
        $this->addRoute(null, null, null, $handler, $info);
    }
269130
public Blade put(@NonNull String path, @NonNull RouteHandler handler) {
        this.routeMatcher.addRoute(path, handler, HttpMethod.PUT);
        return this;
    }