| 1 | <?php |
||
| 6 | class File extends BaseTransport |
||
| 7 | { |
||
| 8 | |||
| 9 | 8 | public function connect(string $address, array $options = []): static |
|
|
|
|||
| 10 | { |
||
| 11 | 8 | $mode = $options['mode'] ?? 'a'; |
|
| 12 | 8 | $include_path = $options['use_include_path'] ?? false; |
|
| 13 | 8 | $context = $options['context'] ?? null; |
|
| 14 | |||
| 15 | 8 | $params = [$address, $mode, $include_path]; |
|
| 16 | 8 | $context && array_push($params, $context); |
|
| 17 | |||
| 18 | 8 | $this->target = fopen(...$params); |
|
| 19 | |||
| 20 | 8 | return $this; |
|
| 21 | } |
||
| 22 | } |
||
| 23 |