BearFramework\App\Routes::add

Registers a request handler

public void add ( string|string[] $pattern , callable $callback [, array $options = ["GET"] ] )

Parameters

pattern Path pattern. Can contain "?" (path part) and "*" (matches everything). callback Function that is expected to return object of type \BearFramework\App\Response. options Matching options for methods (GET, HEAD, POST, DELETE, PUT, PATCH, OPTIONS) and protocols (HTTP, HTTPS).

Return value

No value is returned