ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ 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:
serviceValidate.php:27
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
$data
$data
Definition:
test-settings.sample.php:14
League\Flysystem\Adapter\Polyfill
Definition:
NotSupportingVisibilityTrait.php:3
libs
composer
vendor
league
flysystem
src
Adapter
Polyfill
StreamedReadingTrait.php
Generated on Sat Jan 18 2025 19:01:05 for ILIAS by
1.8.13 (using
Doxyfile
)