Debian Codegraph @

lib/3rdParty/composer/symfony/http-client/Response/ResponseStream.php

raw symbols SCIP
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <[email protected]>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
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 * @author Nicolas Grekas <[email protected]>
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 }