Verzeichnisstruktur phpBB-3.2.0
- Veröffentlicht
- 06.01.2017
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 namespace GuzzleHttp\Stream;
03
04 /**
05 * Lazily reads or writes to a file that is opened only after an IO operation
06 * take place on the stream.
07 */
08 class LazyOpenStream implements StreamInterface
09 {
10 use StreamDecoratorTrait;
11
12 /** @var string File to open */
13 private $filename;
14
15 /** @var string $mode */
16 private $mode;
17
18 /**
19 * @param string $filename File to lazily open
20 * @param string $mode fopen mode to use when opening the stream
21 */
22 public function __construct($filename, $mode)
23 {
24 $this->filename = $filename;
25 $this->mode = $mode;
26 }
27
28 /**
29 * Creates the underlying stream lazily when required.
30 *
31 * @return StreamInterface
32 */
33 protected function createStream()
34 {
35 return Stream::factory(Utils::open($this->filename, $this->mode));
36 }
37 }
38