PluginProbe
Media Cloud Sync / trunk
Media Cloud Sync vtrunk
1.4.1 1.4.0 1.3.12 1.3.11 1.3.10 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.2.0 1.2.10 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 All 35 releases
media-cloud-sync / includes / sdk / google / psr / http-factory / src / StreamFactoryInterface.php

StreamFactoryInterface.php in Media Cloud Sync trunk, at includes/sdk/google/psr/http-factory/src/StreamFactoryInterface.php

44 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 Dudlewebs\WPMCS\GCP\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 * Create a stream from an existing file.
19 *
20 * The file MUST be opened using the given mode, which may be any mode
21 * supported by the `fopen` function.
22 *
23 * The `$filename` MAY be any string supported by `fopen()`.
24 *
25 * @param string $filename Filename or stream URI to use as basis of stream.
26 * @param string $mode Mode with which to open the underlying filename/stream.
27 *
28 * @return StreamInterface
29 * @throws \RuntimeException If the file cannot be opened.
30 * @throws \InvalidArgumentException If the mode is invalid.
31 */
32 public function createStreamFromFile(string $filename, string $mode = 'r') : StreamInterface;
33 /**
34 * Create a new stream from an existing resource.
35 *
36 * The stream MUST be readable and may be writable.
37 *
38 * @param resource $resource PHP resource to use as basis of stream.
39 *
40 * @return StreamInterface
41 */
42 public function createStreamFromResource($resource) : StreamInterface;
43 }
44