You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`getContents(string $extension)`|`string`| Reads the content from a stream and make sure we rewind |
102
+
|`copyToStream(StreamInterface $source, StreamInterface $destination, int $maxLength = null)`|`int`| Copies a stream to another stream, starting from the current position of the source stream, reading to the end or until the given maxlength is hit. |
103
+
|`tryFopen(string $filename, string $mode, $context = null)`|`resource`| Safely open a PHP resource, throws instead of raising warnings and errors |
104
+
|`tryGetContents($stream, int $length = null, int $offset = -1)`|`string`| Safely get the contents of a stream resource, throws instead of raising warnings and errors |
105
+
|`validateMode(string $mode)`|`string`| Checks if the given mode is valid for `fopen()`|
106
+
|`modeAllowsReadWrite(string $mode)`|`bool`| Checks whether the given mode allows reading and writing |
107
+
|`modeAllowsReadOnly(string $mode)`|`bool`| Checks whether the given mode allows only reading |
108
+
|`modeAllowsWriteOnly(string $mode)`|`bool`| Checks whether the given mode allows only writing |
109
+
|`modeAllowsRead(string $mode)`|`bool`| Checks whether the given mode allows reading |
110
+
|`modeAllowsWrite(string $mode)`|`bool`| Checks whether the given mode allows writing |
102
111
103
112
### `ServerUtil`
104
113
The `ServerUtil` object requires a set of [PSR-17 factories](https://www.php-fig.org/psr/psr-17/) on invocation, namely `ServerRequestFactoryInterface`, `UriFactoryInterface`, `UploadedFileFactoryInterface` and `StreamFactoryInterface`.
0 commit comments