Mecha CMS

Lot::get()

Get request headers.

2.2.0 Static

Lot::get(void);
Lot::get(string $key);

Example:

$A = Lot::get();
$B = Lot::get('content-type');
$C = Lot::get('x-foo');

Result:

$A = [
    'accept' => '…',
    'accept-language' => '…',
    'host' => 'mecha-cms.com',
    'user-agent' => '…',
    'x-requested-with' => '…',
    …
    …
];

$B = 'text/html';

$C = null;