33 if ((isset($userData[
'HTTPS']) && $userData[
'HTTPS'] !==
'off') ||
34 ((isset($userData[
'REQUEST_SCHEME']) && $userData[
'REQUEST_SCHEME'] ===
'https'))) {
43 'SERVER_PROTOCOL' =>
'HTTP/1.1',
44 'REQUEST_METHOD' =>
'GET',
45 'REQUEST_SCHEME' => $defscheme,
49 'SERVER_NAME' =>
'localhost',
50 'SERVER_PORT' => $defport,
51 'HTTP_HOST' =>
'localhost',
52 'HTTP_ACCEPT' =>
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
53 'HTTP_ACCEPT_LANGUAGE' =>
'en-US,en;q=0.8',
54 'HTTP_ACCEPT_CHARSET' =>
'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
55 'HTTP_USER_AGENT' =>
'Slim Framework',
56 'REMOTE_ADDR' =>
'127.0.0.1',
57 'REQUEST_TIME' =>
time(),
58 'REQUEST_TIME_FLOAT' => microtime(
true),
61 return new static(
$data);
Slim Framework (https://slimframework.com)
Create styles array
The data for the language used.
static mock(array $userData=[])
Create mock environment.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.