App::setPath

Usage

bool App::setPath(string $path, [bool $is_locked = false])

Description

Change the path /URI the is being requested, which will affect which view is displayed at the end of the request.

Parameters

Parameter Required Type Description
$path Yes string The new path / URI to set.
$is_locked No bool If true the path can not be changed again during the request, and if the method is called again it will return false

Return Value

Whether or not changing the path was successful.

Examples

Set path, and lock it


$app->setPath('/members/payment_required', true);

See Also