PluginProbe ʕ •ᴥ•ʔ
Independent Analytics – WordPress Analytics Plugin / 2.15.0
Independent Analytics – WordPress Analytics Plugin v2.15.0
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 2 years ago RequestInterface.php 2 years ago ResponseInterface.php 2 years ago ServerRequestInterface.php 2 years ago StreamInterface.php 2 years ago UploadedFileInterface.php 2 years ago UriInterface.php 2 years ago
StreamInterface.php
147 lines
1 <?php
2
3 declare (strict_types=1);
4 namespace IAWPSCOPED\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 * @internal
13 */
14 interface StreamInterface
15 {
16 /**
17 * Reads all data from the stream into a string, from the beginning to end.
18 *
19 * This method MUST attempt to seek to the beginning of the stream before
20 * reading data and read the stream until the end is reached.
21 *
22 * Warning: This could attempt to load a large amount of data into memory.
23 *
24 * This method MUST NOT raise an exception in order to conform with PHP's
25 * string casting operations.
26 *
27 * @see http://php.net/manual/en/language.oop5.magic.php#object.tostring
28 * @return string
29 */
30 public function __toString();
31 /**
32 * Closes the stream and any underlying resources.
33 *
34 * @return void
35 */
36 public function close();
37 /**
38 * Separates any underlying resources from the stream.
39 *
40 * After the stream has been detached, the stream is in an unusable state.
41 *
42 * @return resource|null Underlying PHP stream, if any
43 */
44 public function detach();
45 /**
46 * Get the size of the stream if known.
47 *
48 * @return int|null Returns the size in bytes if known, or null if unknown.
49 */
50 public function getSize();
51 /**
52 * Returns the current position of the file read/write pointer
53 *
54 * @return int Position of the file pointer
55 * @throws \RuntimeException on error.
56 */
57 public function tell();
58 /**
59 * Returns true if the stream is at the end of the stream.
60 *
61 * @return bool
62 */
63 public function eof();
64 /**
65 * Returns whether or not the stream is seekable.
66 *
67 * @return bool
68 */
69 public function isSeekable();
70 /**
71 * Seek to a position in the stream.
72 *
73 * @link http://www.php.net/manual/en/function.fseek.php
74 * @param int $offset Stream offset
75 * @param int $whence Specifies how the cursor position will be calculated
76 * based on the seek offset. Valid values are identical to the built-in
77 * PHP $whence values for `fseek()`. SEEK_SET: Set position equal to
78 * offset bytes SEEK_CUR: Set position to current location plus offset
79 * SEEK_END: Set position to end-of-stream plus offset.
80 * @throws \RuntimeException on failure.
81 */
82 public function seek(int $offset, int $whence = \SEEK_SET);
83 /**
84 * Seek to the beginning of the stream.
85 *
86 * If the stream is not seekable, this method will raise an exception;
87 * otherwise, it will perform a seek(0).
88 *
89 * @see seek()
90 * @link http://www.php.net/manual/en/function.fseek.php
91 * @throws \RuntimeException on failure.
92 */
93 public function rewind();
94 /**
95 * Returns whether or not the stream is writable.
96 *
97 * @return bool
98 */
99 public function isWritable();
100 /**
101 * Write data to the stream.
102 *
103 * @param string $string The string that is to be written.
104 * @return int Returns the number of bytes written to the stream.
105 * @throws \RuntimeException on failure.
106 */
107 public function write(string $string);
108 /**
109 * Returns whether or not the stream is readable.
110 *
111 * @return bool
112 */
113 public function isReadable();
114 /**
115 * Read data from the stream.
116 *
117 * @param int $length Read up to $length bytes from the object and return
118 * them. Fewer than $length bytes may be returned if underlying stream
119 * call returns fewer bytes.
120 * @return string Returns the data read from the stream, or an empty string
121 * if no bytes are available.
122 * @throws \RuntimeException if an error occurs.
123 */
124 public function read(int $length);
125 /**
126 * Returns the remaining contents in a string
127 *
128 * @return string
129 * @throws \RuntimeException if unable to read or an error occurs while
130 * reading.
131 */
132 public function getContents();
133 /**
134 * Get stream metadata as an associative array or retrieve a specific key.
135 *
136 * The keys returned are identical to the keys returned from PHP's
137 * stream_get_meta_data() function.
138 *
139 * @link http://php.net/manual/en/function.stream-get-meta-data.php
140 * @param string|null $key Specific metadata to retrieve.
141 * @return array|mixed|null Returns an associative array if no key is
142 * provided. Returns a specific key value if a key is provided and the
143 * value is found, or null if the key is not found.
144 */
145 public function getMetadata(?string $key = null);
146 }
147