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