The concrete5 Request object handles information about the currently requested resource. This is typically a page but may also contain information about a controller task and its parameters.
Obtaining the Request object
The request object can be obtained from within an addon, block, theme or page controller by using the following command:
$req = Request::get();
Returns the currently requested path.
Gets the current collection path as contained in the current request.
Gets page ID of the current request.
Gets the current MVC task of the request. This is the function that will be run by the current page controller (if it exists.).
$array = $req->getRequestTaskParameters();
Gets the array of parameters for this current MVC task
$boolean = $req->isIncludeRequest();
Returns whether this request wants to include a file (typically a tool).
Returns the include type of the current request.
If the current request wants to include a file, this returns the filename it wants to include
Gets the block requested by the current request.
Returns auxiliary data is anything that the request specifies that doesn't really fit inside the request object, but gets passed along anyway.
Gets the package requested by the current request.
Sets the controller task, used when the Page object identifies the actual path.
Sets the controller params, used when the Page object identifies the actual path.
Sets the request path, used when the Page object identifies the actual path.