public __construct ( string $path, string | array $callback, array $options = [], string $host = '', array $schemes = [], array $methods = [] ) | ||
$path | string | Path with parameter names that identifies the route. |
$callback | string | array | Attached callback for this route. |
$options | array | List of options, mostly for parameters. Common option keys are 'pattern' and 'default'. Pattern defines the regular expression for the defined parameter. Default sets the default value for the parameter if it's not matched withing the route. |
$host | string | Fully qualified host name that will be added as a filer for matching the url. |
$schemes | array | An array of supported schemas that the url must match. |
$methods | array | An array of supported methods that the url must match. |