ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
StreamedReadingTrait.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
League\Flysystem\Adapter\Polyfill
;
4
8
trait
StreamedReadingTrait
9
{
19
public
function
readStream(
$path
)
20
{
21
if
( !
$data
= $this->read(
$path
)) {
22
return
false
;
23
}
24
25
$stream
=
fopen
(
'php://temp'
,
'w+b'
);
26
fwrite(
$stream
,
$data
[
'contents'
]);
27
rewind(
$stream
);
28
$data
[
'stream'
] =
$stream
;
29
unset(
$data
[
'contents'
]);
30
31
return
$data
;
32
}
33
43
abstract
public
function
read(
$path
);
44
}
$path
$path
Definition:
aliased.php:25
fopen
League\Flysystem\Adapter\Polyfill\StreamedReadingTrait
trait StreamedReadingTrait
A helper for adapters that only handle strings to provide read streams.
Definition:
StreamedReadingTrait.php:9
GuzzleHttp\Psr7\$stream
$stream
PHP stream implementation.
Definition:
MessageTrait.php:21
League\Flysystem\Adapter\Polyfill
Definition:
NotSupportingVisibilityTrait.php:3
php
$data
$data
Definition:
bench.php:6
libs
composer
vendor
league
flysystem
src
Adapter
Polyfill
StreamedReadingTrait.php
Generated on Thu Feb 27 2025 19:01:20 for ILIAS by
1.8.13 (using
Doxyfile
)