class GuzzleProvider implements ServiceProviderInterface { public function register(Container $pimple) { $pimple['tree.guzzle.client.http.factory'] = $pimple->protect(function($baseUrl, $userAgent) use ($pimple) { $logger = $pimple['logger']; $formatter = new MessageFormatter("{host} {method} {target} {code} {res_header_X-RESPONSE-TIME}"); return new Client([ 'base_uri' => $baseUrl, 'headers' => [ 'User-Agent' => $userAgent, 'Accept' => 'application/json', ], 'on_stats' => function (TransferStats $stats) use ($logger, $formatter) { $request = $stats->getRequest(); $response = $stats->getResponse(); $message = $formatter->format($request, $response->withAddedHeader('X-RESPONSE-TIME', $stats->getTransferTime())); $logger->log(Logger::NOTICE, $message); }, ]); }); } }
Key | Value |
Version | 2.2.0-DEV |
Charset | UTF-8 |
Route Class | Silex\Route |
Dispatcher Class | Symfony\Component\EventDispatcher\EventDispatcher |
Application Class | App\Application |
Key | Value |
URI | http://mythology.net.ua/myth/bogy/germes |
Request URI | /myth/bogy/germes |
Path Info | /myth/bogy/germes |
Query String | |
HTTP Method | GET |
Script Name | /app.php |
Base Path | |
Base URL | |
Scheme | http |
Port | 80 |
Host | mythology.net.ua |
Key | Value |
DATABASE__PASSWORD | vsajkjusz |
DATABASE__USER | myth |
DATABASE__PORT | 3306 |
DATABASE__NAME | myths |
DATABASE__HOST | data.devcomm.org.ua |
USER | www-data |
HOME | /var/www |
FCGI_ROLE | RESPONDER |
SCRIPT_FILENAME | /var/www/mythology.net.ua/app.php |
QUERY_STRING | |
REQUEST_METHOD | GET |
CONTENT_TYPE | |
CONTENT_LENGTH | |
SCRIPT_NAME | /app.php |
REQUEST_URI | /myth/bogy/germes |
DOCUMENT_URI | /app.php//myth/bogy/germes |
DOCUMENT_ROOT | /var/www/mythology.net.ua |
SERVER_PROTOCOL | HTTP/1.1 |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_SOFTWARE | nginx/1.1.19 |
REMOTE_ADDR | 172.70.35.4 |
REMOTE_PORT | 10444 |
SERVER_ADDR | 91.223.180.170 |
SERVER_PORT | 80 |
SERVER_NAME | mythology.net.ua |
HTTPS | |
REDIRECT_STATUS | 200 |
HTTP_HOST | mythology.net.ua |
HTTP_CONNECTION | Keep-Alive |
HTTP_ACCEPT_ENCODING | gzip |
HTTP_X_FORWARDED_FOR | 54.225.24.249 |
HTTP_CF_RAY | 86bdc41e2ea059a3-IAD |
HTTP_X_FORWARDED_PROTO | http |
HTTP_CF_VISITOR | {"scheme":"http"} |
HTTP_ACCEPT | */* |
HTTP_USER_AGENT | claudebot |
HTTP_CF_CONNECTING_IP | 54.225.24.249 |
HTTP_CDN_LOOP | cloudflare |
HTTP_CF_IPCOUNTRY | US |
ORIG_SCRIPT_FILENAME | /var/www/mythology.net.ua/app.php//myth/bogy/germes |
PATH_TRANSLATED | /var/www/mythology.net.ua |
PHP_SELF | /app.php |
REQUEST_TIME_FLOAT | 1711693352.8413 |
REQUEST_TIME | 1711693352 |