DiactorosStreamFactory.php
3 years ago
GuzzleStreamFactory.php
3 years ago
SlimStreamFactory.php
3 years ago
GuzzleStreamFactory.php
22 lines
| 1 | <?php |
| 2 | |
| 3 | namespace AmeliaHttp\Message\StreamFactory; |
| 4 | |
| 5 | use AmeliaHttp\Message\StreamFactory; |
| 6 | |
| 7 | /** |
| 8 | * Creates Guzzle streams. |
| 9 | * |
| 10 | * @author Михаил Красильников <m.krasilnikov@yandex.ru> |
| 11 | */ |
| 12 | final class GuzzleStreamFactory implements StreamFactory |
| 13 | { |
| 14 | /** |
| 15 | * {@inheritdoc} |
| 16 | */ |
| 17 | public function createStream($body = null) |
| 18 | { |
| 19 | return \AmeliaGuzzleHttp\Psr7\stream_for($body); |
| 20 | } |
| 21 | } |
| 22 |