$layout : string
$CurrentLib : \CurrentLib
__construct(\CakeRequest $request = null, \CakeResponse $response = null)
Request object for this controller. Can be null for testing, but expect that features that use the request parameters will not work.
Response object for this controller.
beforeRedirect(string|array $url, integer $status = null, boolean $exit = true) : mixed
The beforeRedirect method is invoked when the controller's redirect method is called but before any further action.
If this method returns false the controller will not continue on to redirect the request. The $url, $status and $exit variables have same meaning as for the controller's method. You can also return a string which will be interpreted as the URL to redirect to or return associative array with key 'url' and optionally 'status' and 'exit'.
A string or array-based URL pointing to another location within the app, or an absolute URL
Optional HTTP status code (eg: 404)
If true, exit() will be called after the redirect
false to stop redirection event, string controllers a new redirection URL or array with the keys url, status and exit to be used by the redirect method.