BearFramework\App\Routes::add

Registers a request handler.
public self add string|string[] $pattern , callable|callable[] $callback )
Parameters
pattern
Path pattern or array of patterns. Can contain "?" (path segment) and "*" (matches everything). Can start with method name (GET, HEAD, POST, DELETE, PUT, PATCH, OPTIONS) or list of method names (GET|HEAD|POST).
callback
Function that is expected to return object of type \BearFramework\App\Response.
Returns
Returns a reference to itself.
Details
Location: ~/src/App/Routes.php
The information on this page is created for version 1.1 of Bear Framework and may not be applicable for other versions of the framework.