class Group extends Router (View source)

Properties

static protected array $httpRoutes

Store normal routes

from  Router
static protected array $httpParamRoutes

Store param routes

from  Router
static protected string $prefixNS

Define namespace prefix to Controllers

from  Router
static protected string $prefixPath

Define path prefix to routes

from  Router

Methods

static bool
find(string $route, string $path, array $matches)

Get params from routes using regex

from  Router
static Group
create()

Create a new route group

prefixNS(string $namespace)

Define namespace prefix for group

domain(string $domain)

Define domain for group

path(string $path)

Define path for group

secure(bool $secure)

Access only with HTTPS or only HTTP

then(Closure $callback)

Define callback for group, this callback is executed if the request meets the group settings

bool
checkSecurity()

Method is used for check if HTTPS or HTTP or both

bool
checkDomain()

Method is used for check domain and return arguments if using regex

bool
checkPath()

Method is used for check path

Details

static protected bool find(string $route, string $path, array $matches)

Get params from routes using regex

Parameters

string $route
string $path
array $matches

Return Value

bool

static Group create()

Create a new route group

Return Value

Group

Group prefixNS(string $namespace)

Define namespace prefix for group

Parameters

string $namespace

Return Value

Group

Group domain(string $domain)

Define domain for group

Parameters

string $domain

Return Value

Group

Exceptions

Exception

Group path(string $path)

Define path for group

Parameters

string $path

Return Value

Group

Exceptions

Exception

Group secure(bool $secure)

Access only with HTTPS or only HTTP

Parameters

bool $secure

Define true for only accepet HTTPS, or define false for only HTTP

Return Value

Group

Exceptions

Exception

then(Closure $callback)

Define callback for group, this callback is executed if the request meets the group settings

Parameters

Closure $callback

protected bool checkSecurity()

Method is used for check if HTTPS or HTTP or both

Return Value

bool

protected bool checkDomain()

Method is used for check domain and return arguments if using regex

Return Value

bool

protected bool checkPath()

Method is used for check path

Return Value

bool