19declare(strict_types=1);
29trait MemoryStreamToTempFileStream
31 protected function maybeSafeToTempStream(FileStream $stream): FileStream
33 if ($stream->getMetadata()[
'uri'] ===
'php://memory') {
36 fwrite($tmp, (
string) $stream);
38 $temp_stream->rewind();
Stream factory which enables the user to create streams without the knowledge of the concrete class.
static ofResource($resource)
Wraps an already created resource with the stream abstraction.
The base interface for all filesystem streams.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...