PluginProbe ʕ •ᴥ•ʔ
Independent Analytics – WordPress Analytics Plugin / 1.30.0
Independent Analytics – WordPress Analytics Plugin v1.30.0
2.15.5 2.15.4 2.15.3 2.15.2 2.15.1 2.15.0 2.14.10 trunk 1.1 1.10 1.10.1 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.17.1 1.17.2 1.17.3 1.17.4 1.18 1.18.1 1.19.0 1.19.1 1.2 1.20.0 1.21.0 1.22.0 1.22.1 1.23.0 1.23.1 1.24.0 1.24.1 1.25.0 1.25.1 1.26.0 1.27.0 1.28.0 1.28.1 1.28.2 1.28.3 1.29.0 1.3 1.30.0 1.30.1 1.4 1.5 1.6 1.7 1.8 1.9 2.0.0 2.0.1 2.1.4 2.1.5 2.1.6 2.10.0 2.10.1 2.10.2 2.10.3 2.10.4 2.11.0 2.11.1 2.11.10 2.11.2 2.11.3 2.11.4 2.11.5 2.11.6 2.11.7 2.11.8 2.11.9 2.12.0 2.12.1 2.12.2 2.13.1 2.13.2 2.13.5 2.13.6 2.14.0 2.14.1 2.14.2 2.14.4 2.14.6 2.14.7 2.14.8 2.14.9 2.2.0 2.2.1 2.3.1 2.3.2 2.4.2 2.4.3 2.5.0 2.5.1 2.6.0 2.6.1 2.6.2 2.6.3 2.6.4 2.7.0 2.7.1 2.7.2 2.7.3 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7
independent-analytics / vendor / psr / http-message / src / StreamInterface.php
independent-analytics / vendor / psr / http-message / src Last commit date
MessageInterface.php 3 years ago RequestInterface.php 3 years ago ResponseInterface.php 3 years ago ServerRequestInterface.php 3 years ago StreamInterface.php 3 years ago UploadedFileInterface.php 3 years ago UriInterface.php 3 years ago
StreamInterface.php
146 lines
1 <?php
2
3 declare (strict_types=1);
4 namespace IAWP_SCOPED\Psr\Http\Message;
5
6 /**
7 * Describes a data stream.
8 *
9 * Typically, an instance will wrap a PHP stream; this interface provides
10 * a wrapper around the most common operations, including serialization of
11 * the entire stream to a string.
12 */
13 interface StreamInterface
14 {
15 /**
16 * Reads all data from the stream into a string, from the beginning to end.
17 *
18 * This method MUST attempt to seek to the beginning of the stream before
19 * reading data and read the stream until the end is reached.
20 *
21 * Warning: This could attempt to load a large amount of data into memory.
22 *
23 * This method MUST NOT raise an exception in order to conform with PHP's
24 * string casting operations.
25 *
26 * @see http://php.net/manual/en/language.oop5.magic.php#object.tostring
27 * @return string
28 */
29 public function __toString();
30 /**
31 * Closes the stream and any underlying resources.
32 *
33 * @return void
34 */
35 public function close();
36 /**
37 * Separates any underlying resources from the stream.
38 *
39 * After the stream has been detached, the stream is in an unusable state.
40 *
41 * @return resource|null Underlying PHP stream, if any
42 */
43 public function detach();
44 /**
45 * Get the size of the stream if known.
46 *
47 * @return int|null Returns the size in bytes if known, or null if unknown.
48 */
49 public function getSize();
50 /**
51 * Returns the current position of the file read/write pointer
52 *
53 * @return int Position of the file pointer
54 * @throws \RuntimeException on error.
55 */
56 public function tell();
57 /**
58 * Returns true if the stream is at the end of the stream.
59 *
60 * @return bool
61 */
62 public function eof();
63 /**
64 * Returns whether or not the stream is seekable.
65 *
66 * @return bool
67 */
68 public function isSeekable();
69 /**
70 * Seek to a position in the stream.
71 *
72 * @link http://www.php.net/manual/en/function.fseek.php
73 * @param int $offset Stream offset
74 * @param int $whence Specifies how the cursor position will be calculated
75 * based on the seek offset. Valid values are identical to the built-in
76 * PHP $whence values for `fseek()`. SEEK_SET: Set position equal to
77 * offset bytes SEEK_CUR: Set position to current location plus offset
78 * SEEK_END: Set position to end-of-stream plus offset.
79 * @throws \RuntimeException on failure.
80 */
81 public function seek(int $offset, int $whence = \SEEK_SET);
82 /**
83 * Seek to the beginning of the stream.
84 *
85 * If the stream is not seekable, this method will raise an exception;
86 * otherwise, it will perform a seek(0).
87 *
88 * @see seek()
89 * @link http://www.php.net/manual/en/function.fseek.php
90 * @throws \RuntimeException on failure.
91 */
92 public function rewind();
93 /**
94 * Returns whether or not the stream is writable.
95 *
96 * @return bool
97 */
98 public function isWritable();
99 /**
100 * Write data to the stream.
101 *
102 * @param string $string The string that is to be written.
103 * @return int Returns the number of bytes written to the stream.
104 * @throws \RuntimeException on failure.
105 */
106 public function write(string $string);
107 /**
108 * Returns whether or not the stream is readable.
109 *
110 * @return bool
111 */
112 public function isReadable();
113 /**
114 * Read data from the stream.
115 *
116 * @param int $length Read up to $length bytes from the object and return
117 * them. Fewer than $length bytes may be returned if underlying stream
118 * call returns fewer bytes.
119 * @return string Returns the data read from the stream, or an empty string
120 * if no bytes are available.
121 * @throws \RuntimeException if an error occurs.
122 */
123 public function read(int $length);
124 /**
125 * Returns the remaining contents in a string
126 *
127 * @return string
128 * @throws \RuntimeException if unable to read or an error occurs while
129 * reading.
130 */
131 public function getContents();
132 /**
133 * Get stream metadata as an associative array or retrieve a specific key.
134 *
135 * The keys returned are identical to the keys returned from PHP's
136 * stream_get_meta_data() function.
137 *
138 * @link http://php.net/manual/en/function.stream-get-meta-data.php
139 * @param string|null $key Specific metadata to retrieve.
140 * @return array|mixed|null Returns an associative array if no key is
141 * provided. Returns a specific key value if a key is provided and the
142 * value is found, or null if the key is not found.
143 */
144 public function getMetadata(?string $key = null);
145 }
146