class Group extends Router (View source)

Constants

BOTH

Access with HTTP and HTTPS (default)

SECURE

Access only in HTTPS

NONSECURE

Access only without HTTPS

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(int $level)

Access only with HTTPS, or only HTTP, or both

void
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(int $level)

Access only with HTTPS, or only HTTP, or both

Parameters

int $level

Return Value

Group

Exceptions

Exception

void then(Closure $callback)

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

Parameters

Closure $callback

Return Value

void

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