PluginProbe
TablePress – Tables in WordPress made easy / 3.0
TablePress – Tables in WordPress made easy v3.0
3.3.4 3.3.3 3.3.2 3.3.1 trunk 1.12 1.14 1.9.2 2.0.4 2.1.7 2.1.8 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3 2.3.1 2.3.2 2.4 2.4.1 2.4.2 2.4.3 2.4.4 All 44 releases
tablepress / libraries / vendor / Psr / Http / Message / StreamFactoryInterface.php

StreamFactoryInterface.php in TablePress – Tables in WordPress made easy 3.0, at libraries/vendor/Psr/Http/Message/StreamFactoryInterface.php

46 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace TablePress\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