1 | <?php |
||
28 | class StreamWrapper |
||
29 | { |
||
30 | /** |
||
31 | * @var resource|null The stream context |
||
32 | */ |
||
33 | public $context; |
||
34 | |||
35 | /** |
||
36 | * @var StreamInterface|null The PSR-7 stream |
||
37 | */ |
||
38 | private $stream; |
||
39 | |||
40 | /** |
||
41 | * @var string|null The stream mode |
||
42 | */ |
||
43 | private $mode; |
||
44 | |||
45 | /** |
||
46 | * Registers this stream wrapper |
||
47 | */ |
||
48 | public static function register(): void |
||
54 | |||
55 | /** |
||
56 | * Unregisters this stream wrapper |
||
57 | */ |
||
58 | public static function unregister(): void |
||
64 | |||
65 | /** |
||
66 | * Gets a PHP stream resource for the provided PSR-7 stream. |
||
67 | * |
||
68 | * @param \Psr\Http\Message\StreamInterface $stream The stream to wrap |
||
69 | * @return resource The generated resource |
||
70 | * @throws \InvalidArgumentException if stream is not readable or writable |
||
71 | */ |
||
72 | public static function getResource(\Psr\Http\Message\StreamInterface $stream) |
||
86 | |||
87 | public function stream_open(string $path, string $mode, int $options, ?string &$opened_path) |
||
97 | |||
98 | public function stream_read(int $count): string |
||
102 | |||
103 | public function stream_write(string $data): int |
||
107 | |||
108 | public function stream_tell(): int |
||
112 | |||
113 | public function stream_eof(): bool |
||
117 | |||
118 | public function stream_seek(int $offset, int $whence = SEEK_SET): bool |
||
122 | |||
123 | public function stream_stat(): array |
||
135 | |||
136 | /** |
||
137 | * Gets a URL stat template with default values. |
||
138 | * |
||
139 | * Blatently lifted from https://github.com/aws/aws-sdk-php/blob/master/src/S3/StreamWrapper.php |
||
140 | * |
||
141 | * @return - The stat template. |
||
142 | */ |
||
143 | private function getStatTemplate(): array |
||
161 | } |
||
162 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.