| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
namespace Symfony\Component\HttpClient\Response; |
| 13 |
|
| 14 |
use Symfony\Contracts\HttpClient\ChunkInterface; |
| 15 |
use Symfony\Contracts\HttpClient\ResponseInterface; |
| 16 |
use Symfony\Contracts\HttpClient\ResponseStreamInterface; |
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
final class ResponseStream implements ResponseStreamInterface |
| 22 |
{ |
| 23 |
public function __construct( |
| 24 |
private \Generator $generator, |
| 25 |
) { |
| 26 |
} |
| 27 |
|
| 28 |
public function key(): ResponseInterface |
| 29 |
{ |
| 30 |
return $this->generator->key(); |
| 31 |
} |
| 32 |
|
| 33 |
public function current(): ChunkInterface |
| 34 |
{ |
| 35 |
return $this->generator->current(); |
| 36 |
} |
| 37 |
|
| 38 |
public function next(): void |
| 39 |
{ |
| 40 |
$this->generator->next(); |
| 41 |
} |
| 42 |
|
| 43 |
public function rewind(): void |
| 44 |
{ |
| 45 |
$this->generator->rewind(); |
| 46 |
} |
| 47 |
|
| 48 |
public function valid(): bool |
| 49 |
{ |
| 50 |
return $this->generator->valid(); |
| 51 |
} |
| 52 |
} |