1 | <?php |
||
7 | class Stream implements StreamWrapperInterface |
||
8 | { |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | private $content; |
||
13 | |||
14 | /** |
||
15 | * @var Mode |
||
16 | */ |
||
17 | private $mode; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | private $path; |
||
23 | |||
24 | /** |
||
25 | * @var int |
||
26 | */ |
||
27 | private $pointer; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | private $contentLeft; |
||
33 | |||
34 | /** |
||
35 | * @var DateTime |
||
36 | */ |
||
37 | private $lastAccess; |
||
38 | |||
39 | /** |
||
40 | * @var DateTime |
||
41 | */ |
||
42 | private $lastModification; |
||
43 | |||
44 | const HOST = 'host'; |
||
45 | const POINTER_INITIAL_POSITION = 0; |
||
46 | const DEFAULT_PROTOCOL = 'virtual'; |
||
47 | |||
48 | 9 | public function __construct() |
|
52 | |||
53 | 9 | public function stream_open(string $path, string $mode, int $options, &$opened_path) |
|
63 | |||
64 | 5 | public function stream_read($count): string |
|
80 | |||
81 | 6 | public function stream_eof(): bool |
|
85 | |||
86 | 5 | public function stream_seek(int $position, int $whence = SEEK_SET) |
|
90 | |||
91 | 7 | public function stream_write(string $data) |
|
110 | |||
111 | 1 | public function stream_truncate(int $newSize): bool |
|
119 | |||
120 | public function stream_tell() |
||
124 | |||
125 | public function stream_stat(): array |
||
143 | |||
144 | |||
145 | public function stream_flush() |
||
149 | |||
150 | 12 | public static function register(string $protocol = self::DEFAULT_PROTOCOL): bool |
|
154 | |||
155 | 8 | public static function unregister(string $protocol = self::DEFAULT_PROTOCOL): bool |
|
159 | |||
160 | 9 | protected function setLastAccess() |
|
164 | |||
165 | 6 | protected function setLastModification() |
|
169 | } |
||
170 |