X7ROOT File Manager
Current Path:
/home/gfecatvj/sites/realesbar/vendor/laminas/laminas-diactoros/src
home
/
gfecatvj
/
sites
/
realesbar
/
vendor
/
laminas
/
laminas-diactoros
/
src
/
📁
..
📄
AbstractSerializer.php
(4.48 KB)
📄
CallbackStream.php
(3.35 KB)
📄
ConfigProvider.php
(1.54 KB)
📁
Exception
📄
HeaderSecurity.php
(5.31 KB)
📄
MessageTrait.php
(12.63 KB)
📄
Module.php
(521 B)
📄
PhpInputStream.php
(1.8 KB)
📄
RelativeStream.php
(3.76 KB)
📁
Request
📄
Request.php
(2.07 KB)
📄
RequestFactory.php
(662 B)
📄
RequestTrait.php
(9.96 KB)
📁
Response
📄
Response.php
(5.88 KB)
📄
ResponseFactory.php
(727 B)
📄
ServerRequest.php
(6.44 KB)
📄
ServerRequestFactory.php
(3.02 KB)
📄
Stream.php
(8.06 KB)
📄
StreamFactory.php
(1.45 KB)
📄
UploadedFile.php
(7.49 KB)
📄
UploadedFileFactory.php
(1.02 KB)
📄
Uri.php
(17.34 KB)
📄
UriFactory.php
(621 B)
📁
functions
Editing: Request.php
<?php /** * @see https://github.com/laminas/laminas-diactoros for the canonical source repository * @copyright https://github.com/laminas/laminas-diactoros/blob/master/COPYRIGHT.md * @license https://github.com/laminas/laminas-diactoros/blob/master/LICENSE.md New BSD License */ declare(strict_types=1); namespace Laminas\Diactoros; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamInterface; use Psr\Http\Message\UriInterface; use function strtolower; /** * HTTP Request encapsulation * * Requests are considered immutable; all methods that might change state are * implemented such that they retain the internal state of the current * message and return a new instance that contains the changed state. */ class Request implements RequestInterface { use RequestTrait; /** * @param null|string|UriInterface $uri URI for the request, if any. * @param null|string $method HTTP method for the request, if any. * @param string|resource|StreamInterface $body Message body, if any. * @param array $headers Headers for the message, if any. * @throws Exception\InvalidArgumentException for any invalid value. */ public function __construct($uri = null, string $method = null, $body = 'php://temp', array $headers = []) { $this->initialize($uri, $method, $body, $headers); } /** * {@inheritdoc} */ public function getHeaders() : array { $headers = $this->headers; if (! $this->hasHeader('host') && $this->uri->getHost() ) { $headers['Host'] = [$this->getHostFromUri()]; } return $headers; } /** * {@inheritdoc} */ public function getHeader($header) : array { if (! $this->hasHeader($header)) { if (strtolower($header) === 'host' && $this->uri->getHost() ) { return [$this->getHostFromUri()]; } return []; } $header = $this->headerNames[strtolower($header)]; return $this->headers[$header]; } }
Upload File
Create Folder