Get information about the incoming HTTP request.
This is the code documentation for the SproutCMS project
Search documentation |
class RequestGet information about the incoming HTTP request.
Variables
Functions
public acceptsboolean Request::accepts ( [ string $type [, boolean $explicit_check ]] ); Returns boolean of whether client accepts content type. public acceptsAtQualityinteger|float Request::acceptsAtQuality ( [ string $type [, boolean $explicit_check ]] ); Returns quality factor at which the client accepts content type. public getHeadersarray Request::getHeaders ( ); Get the headers as an array. All keys are lowercase. public isAjaxboolean Request::isAjax ( ); Tests if the current request is an AJAX request by checking the X-Requested-With HTTP request header that most popular JS frameworks now set for AJAX calls. public methodstring Request::method ( ); Returns current request method. protected parseAcceptHeadervoid Request::parseAcceptHeader ( ); Parses client's HTTP Accept request header, and builds array structure representing it. public preferredAcceptmixed Request::preferredAccept ( array $types [, boolean $explicit_check ] ); Compare the q values for given array of content types and return the one with the highest value. If items are found to have the same q value, the first one encountered in the given array wins. If all items in the given array have a q value of 0, FALSE is returned. public protocolstring Request::protocol ( ); Returns the current request protocol, based on $_SERVER['https']. In CLI mode, NULL will be returned. public referrerstring Request::referrer ( [ mixed $default ] ); Returns the HTTP referrer, or the default if the referrer is not set. public userIpunknown Request::userIp ( ); Returns the users IP address, accounting for proxy forwarding |
| Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Tuesday, 15th September, 2026 at 10:26 am |
|