1 | <?php |
||
18 | class StreamWrapper |
||
19 | { |
||
20 | /** @var string */ |
||
21 | public const NAME = 'json-collection-parser'; |
||
22 | |||
23 | /** |
||
24 | * The current context, or NULL if no context |
||
25 | * was passed to the caller function. |
||
26 | * |
||
27 | * @var resource|null |
||
28 | */ |
||
29 | public $context; |
||
30 | |||
31 | /** @var StreamInterface */ |
||
32 | protected $stream; |
||
33 | |||
34 | /** |
||
35 | * Opens file or URL |
||
36 | * |
||
37 | * This method is called immediately after the wrapper is initialized |
||
38 | * (f.e. by fopen() and file_get_contents()). |
||
39 | * |
||
40 | * @param string $path |
||
41 | * @param string $mode |
||
42 | * @param int $options |
||
43 | * @param string $opened_path |
||
44 | * |
||
45 | * @return bool |
||
46 | */ |
||
47 | public function stream_open(string $path, string $mode, int $options, &$opened_path): bool |
||
60 | |||
61 | /** |
||
62 | * Tests for end-of-file on a file pointer |
||
63 | * |
||
64 | * This method is called in response to feof(). |
||
65 | * |
||
66 | * @return bool |
||
67 | */ |
||
68 | public function stream_eof(): bool |
||
72 | |||
73 | /** |
||
74 | * Read from stream |
||
75 | * |
||
76 | * This method is called in response to fread() and fgets(). |
||
77 | * |
||
78 | * @param int $count |
||
79 | * |
||
80 | * @throws RuntimeException if an error occurs. |
||
81 | * |
||
82 | * @return string |
||
83 | */ |
||
84 | public function stream_read(int $count): string |
||
88 | } |
||
89 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.