Submit
Path:
~
/
/
opt
/
psa
/
admin
/
plib
/
modules
/
platform360
/
vendor
/
kevinrob
/
guzzle-cache-middleware
/
src
/
File Content:
BodyStore.php
<?php namespace Platform360\Kevinrob\GuzzleCache; /** * * This object is only meant to provide a callable to `GuzzleHttp\Psr7\PumpStream`. * * @internal don't use it in your project. */ class BodyStore { private $body; private $read = 0; private $toRead; public function __construct(string $body) { $this->body = $body; $this->toRead = \mb_strlen($this->body); } /** * @param int $length * @return false|string */ public function __invoke(int $length) { if ($this->toRead <= 0) { return \false; } $length = \min($length, $this->toRead); $body = \mb_substr($this->body, $this->read, $length); $this->toRead -= $length; $this->read += $length; return $body; } }
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
Storage
---
0755
Strategy
---
0755
BodyStore.php
806 bytes
0644
CacheEntry.php
8534 bytes
0644
CacheMiddleware.php
13209 bytes
0644
KeyValueHttpHeader.php
3276 bytes
0644
N4ST4R_ID | Naxtarrr