CRM_Utils_Request
class CRM_Utils_Request
Class for managing a http request
Methods
Get a unique ID for the request.
Retrieve a value from the request (GET/POST/REQUEST)
No description
This is a replacement for $_REQUEST which includes $_GET/$_POST but excludes $_COOKIE / $_ENV / $_SERVER.
Details
at line 60
static string
id()
Get a unique ID for the request.
This unique ID is assigned to mysql when the connection is opened and is available in PHP.
The intent is that it is available for logging purposes and for triggers.
The resulting string is 17 characters long. This consists of 13 characters of uniqid and 4 more random characters.
Uniqid is unique to the microsecond - to make it more unique we add 4 more characters but stop short of the full 23 character string that a prefix would generate.
It is intended that this string will be saved to log tables so striking a balance between uniqueness and length is important. Note that I did check & lining up with byte values (e.g 16 characters) does not confer any benefits. Using a CHAR field rather than VARCHAR may improve speed, if indexed.
at line 86
static mixed
retrieve(string $name, string $type, object $store = NULL, bool $abort = FALSE, mixed $default = NULL, string $method = 'REQUEST')
Retrieve a value from the request (GET/POST/REQUEST)
at line 148
static mixed
getValue(string $name, array $method)
at line 173
static array
exportValues()
This is a replacement for $_REQUEST which includes $_GET/$_POST but excludes $_COOKIE / $_ENV / $_SERVER.