PATH:
home
/
lab2454c
/
sothebry.softkinesis.com
/
backups
/
core
/
vendor
/
laminas
/
laminas-diactoros
/
src
<?php 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; } }
[+]
functions
[-] AbstractSerializer.php
[edit]
[-] ServerRequestFactory.php
[edit]
[-] ConfigProvider.php
[edit]
[+]
..
[+]
Exception
[-] RequestFactory.php
[edit]
[-] MessageTrait.php
[edit]
[-] Request.php
[edit]
[-] UploadedFile.php
[edit]
[-] RelativeStream.php
[edit]
[-] Stream.php
[edit]
[-] RequestTrait.php
[edit]
[-] Module.php
[edit]
[-] PhpInputStream.php
[edit]
[+]
Request
[+]
Response
[-] UriFactory.php
[edit]
[-] UploadedFileFactory.php
[edit]
[-] Uri.php
[edit]
[-] ResponseFactory.php
[edit]
[-] HeaderSecurity.php
[edit]
[-] CallbackStream.php
[edit]
[-] ServerRequest.php
[edit]
[-] StreamFactory.php
[edit]
[-] Response.php
[edit]