Skip to content

Params

  • Full name: \Zemit\Mvc\Controller\Traits\Params

Methods

getParam

Get a specific parameter value by key.

public getParam(string $key, array|string|null $filters = null, mixed $default = null, array|null $params = null): mixed

Parameters:

Parameter Type Description
$key string The key of the parameter.
$filters **array string
$default mixed Optional. The default value if the parameter does not exist. Defaults to null.
$params **array null**

Return Value:

The value of the specified parameter, after applying the filters if provided. If the parameter does not exist, then the default value is returned if provided. If both the parameter and the default value are missing, then the value from the dispatcher's parameter is returned.

Throws:


getParams

Retrieves the request parameters.

public getParams(array|null $filters = null): array

Parameters:

Parameter Type Description
$filters **array null**

Return Value:

The request parameters.