$layout
$layout : string
use layout
NetCommonsApp Controller
$CurrentLib : \CurrentLib
CurrentLibライブラリ
__construct(\CakeRequest $request = null, \CakeResponse $response = null)
Constructor.
\CakeRequest | $request | Request object for this controller. Can be null for testing, but expect that features that use the request parameters will not work. |
\CakeResponse | $response | Response object for this controller. |
referer(string $default = null, boolean $local = true) : string
Returns the referring URL for this request.
string | $default | Default URL to use if HTTP_REFERER cannot be read from headers |
boolean | $local | If true, restrict referring URLs to local server |
Referring URL
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'.
string|array | $url | A string or array-based URL pointing to another location within the app, or an absolute URL |
integer | $status | Optional HTTP status code (eg: 404) |
boolean | $exit | 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.