Server IP : 66.29.132.124 / Your IP : 3.15.225.188 Web Server : LiteSpeed System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : wavevlvu ( 1524) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/wavevlvu/book24.ng/vendor/php-http/message/src/StreamFactory/ |
Upload File : |
<?php namespace Http\Message\StreamFactory; use Http\Message\StreamFactory; use Psr\Http\Message\StreamInterface; use Slim\Http\Stream; /** * Creates Slim 3 streams. * * @author Mika Tuupola <tuupola@appelsiini.net> * * @deprecated This will be removed in php-http/message2.0. Consider using the official Slim PSR-17 factory */ final class SlimStreamFactory implements StreamFactory { /** * {@inheritdoc} */ public function createStream($body = null) { if ($body instanceof StreamInterface) { return $body; } if (is_resource($body)) { return new Stream($body); } $resource = fopen('php://memory', 'r+'); $stream = new Stream($resource); if (null !== $body && '' !== $body) { $stream->write((string) $body); } return $stream; } }