Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
LazyOpenStream.php
01 <?php
02
03 namespace GuzzleHttp\Psr7;
04
05 use Psr\Http\Message\StreamInterface;
06
07 /**
08 * Lazily reads or writes to a file that is opened only after an IO operation
09 * take place on the stream.
10 *
11 * @final
12 */
13 class LazyOpenStream implements StreamInterface
14 {
15 use StreamDecoratorTrait;
16
17 /** @var string File to open */
18 private $filename;
19
20 /** @var string */
21 private $mode;
22
23 /**
24 * @param string $filename File to lazily open
25 * @param string $mode fopen mode to use when opening the stream
26 */
27 public function __construct($filename, $mode)
28 {
29 $this->filename = $filename;
30 $this->mode = $mode;
31 }
32
33 /**
34 * Creates the underlying stream lazily when required.
35 *
36 * @return StreamInterface
37 */
38 protected function createStream()
39 {
40 return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode));
41 }
42 }
43