Webiny\Component\Router\Route\Route::__construct PHP Method

__construct() public method

Base constructor.
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.
    public function __construct($path, $callback, $options = [], $host = '', $schemes = [], $methods = [])
    {
        $this->setPath($path);
        $this->setCallback($callback);
        $this->setOptions($options);
        $this->setHost($host);
        $this->setSchemes($schemes);
        $this->setMethods($methods);
    }