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: PhpInputStream.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 function stream_get_contents; /** * Caching version of php://input */ class PhpInputStream extends Stream { /** * @var string */ private $cache = ''; /** * @var bool */ private $reachedEof = false; /** * @param string|resource $stream */ public function __construct($stream = 'php://input') { parent::__construct($stream, 'r'); } /** * {@inheritdoc} */ public function __toString() : string { if ($this->reachedEof) { return $this->cache; } $this->getContents(); return $this->cache; } /** * {@inheritdoc} */ public function isWritable() : bool { return false; } /** * {@inheritdoc} */ public function read($length) : string { $content = parent::read($length); if (! $this->reachedEof) { $this->cache .= $content; } if ($this->eof()) { $this->reachedEof = true; } return $content; } /** * {@inheritdoc} */ public function getContents($maxLength = -1) : string { if ($this->reachedEof) { return $this->cache; } $contents = stream_get_contents($this->resource, $maxLength); $this->cache .= $contents; if ($maxLength === -1 || $this->eof()) { $this->reachedEof = true; } return $contents; } }
Upload File
Create Folder