\Hubleto\Framework\Interfaces\RouterInterface
Methods
ƒ init
public init(): void
ƒ isAjax
public isAjax(): bool
ƒ extractParamsFromRequest
public extractParamsFromRequest(): array
ƒ extractRouteFromRequest
public extractRouteFromRequest(): string
ƒ get
public get(array $routes): mixed
Parameters
| Parameter |
Type |
Description |
$routes |
array |
|
ƒ getRoutes
public getRoutes(string $method): array
Parameters
| Parameter |
Type |
Description |
$method |
string |
|
ƒ parseRoute
public parseRoute(string $method, string $route): array
Parameters
| Parameter |
Type |
Description |
$method |
string |
|
$route |
string |
|
ƒ getRoute
public getRoute(): string
ƒ setRoute
public setRoute(string $route): void
Parameters
| Parameter |
Type |
Description |
$route |
string |
|
ƒ setRouteVars
public setRouteVars(array $routeVars): void
Parameters
| Parameter |
Type |
Description |
$routeVars |
array |
|
ƒ getRouteVars
public getRouteVars(): array
ƒ getRouteVar
public getRouteVar(string|int $varIndex): string
Parameters
| Parameter |
Type |
Description |
$varIndex |
string|int |
|
ƒ routeVarAsString
public routeVarAsString(string|int $varIndex): string
Parameters
| Parameter |
Type |
Description |
$varIndex |
string|int |
|
ƒ routeVarAsInteger
public routeVarAsInteger(string|int $varIndex): int
Parameters
| Parameter |
Type |
Description |
$varIndex |
string|int |
|
ƒ routeVarAsFloat
public routeVarAsFloat(string|int $varIndex): float
Parameters
| Parameter |
Type |
Description |
$varIndex |
string|int |
|
ƒ routeVarAsBool
public routeVarAsBool(string|int $varIndex): bool
Parameters
| Parameter |
Type |
Description |
$varIndex |
string|int |
|
ƒ redirectTo
public redirectTo(string $url, int $code = 302): void
Parameters
| Parameter |
Type |
Description |
$url |
string |
|
$code |
int |
|
ƒ getUrlParams
public getUrlParams(): array
ƒ isUrlParam
public isUrlParam(string $paramName): bool
Parameters
| Parameter |
Type |
Description |
$paramName |
string |
|
ƒ urlParamNotEmpty
public urlParamNotEmpty(string $paramName): bool
Parameters
| Parameter |
Type |
Description |
$paramName |
string |
|
ƒ setUrlParam
public setUrlParam(string $paramName, string $newValue): void
Parameters
| Parameter |
Type |
Description |
$paramName |
string |
|
$newValue |
string |
|
ƒ removeUrlParam
public removeUrlParam(string $paramName): void
Parameters
| Parameter |
Type |
Description |
$paramName |
string |
|
ƒ urlParamAsString
public urlParamAsString(string $paramName, string $defaultValue = ''): string
Parameters
| Parameter |
Type |
Description |
$paramName |
string |
|
$defaultValue |
string |
|
ƒ urlParamAsInteger
public urlParamAsInteger(string $paramName, int $defaultValue): int
Parameters
| Parameter |
Type |
Description |
$paramName |
string |
|
$defaultValue |
int |
|
ƒ urlParamAsFloat
public urlParamAsFloat(string $paramName, float $defaultValue): float
Parameters
| Parameter |
Type |
Description |
$paramName |
string |
|
$defaultValue |
float |
|
ƒ urlParamAsBool
public urlParamAsBool(string $paramName, bool $defaultValue = false): bool
Parameters
| Parameter |
Type |
Description |
$paramName |
string |
|
$defaultValue |
bool |
|
ƒ urlParamAsArray
public urlParamAsArray(string $paramName, array $defaultValue = []): array
Parameters
| Parameter |
Type |
Description |
$paramName |
string |
|
$defaultValue |
array |
|