PluginProbe
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript / 4.1.17
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript v4.1.17
4.1.19 4.1.18 4.1.17 4.1.16 4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.0.30 4.0.29 4.0.28 4.0.27 4.0.26 4.0.24 4.0.25 4.0.23 4.0.22 4.0.21 4.0.19 4.0.18 4.0.17 4.0.16 1.9.3 All 173 releases
searchpro / BerqWP / vendor / psr / http-factory / src / StreamFactoryInterface.php

StreamFactoryInterface.php in BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript 4.1.17, at BerqWP/vendor/psr/http-factory/src/StreamFactoryInterface.php

46 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Psr\Http\Message;
4
5 interface StreamFactoryInterface
6 {
7 /**
8 * Create a new stream from a string.
9 *
10 * The stream SHOULD be created with a temporary resource.
11 *
12 * @param string $content String content with which to populate the stream.
13 *
14 * @return StreamInterface
15 */
16 public function createStream(string $content = ''): StreamInterface;
17
18 /**
19 * Create a stream from an existing file.
20 *
21 * The file MUST be opened using the given mode, which may be any mode
22 * supported by the `fopen` function.
23 *
24 * The `$filename` MAY be any string supported by `fopen()`.
25 *
26 * @param string $filename Filename or stream URI to use as basis of stream.
27 * @param string $mode Mode with which to open the underlying filename/stream.
28 *
29 * @return StreamInterface
30 * @throws \RuntimeException If the file cannot be opened.
31 * @throws \InvalidArgumentException If the mode is invalid.
32 */
33 public function createStreamFromFile(string $filename, string $mode = 'r'): StreamInterface;
34
35 /**
36 * Create a new stream from an existing resource.
37 *
38 * The stream MUST be readable and may be writable.
39 *
40 * @param resource $resource PHP resource to use as basis of stream.
41 *
42 * @return StreamInterface
43 */
44 public function createStreamFromResource($resource): StreamInterface;
45 }
46