| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
namespace Symfony\Component\HttpClient\Chunk; |
| 13 |
|
| 14 |
use Symfony\Contracts\HttpClient\ChunkInterface; |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
class DataChunk implements ChunkInterface |
| 22 |
{ |
| 23 |
public function __construct( |
| 24 |
private int $offset = 0, |
| 25 |
private string $content = '', |
| 26 |
) { |
| 27 |
} |
| 28 |
|
| 29 |
public function isTimeout(): bool |
| 30 |
{ |
| 31 |
return false; |
| 32 |
} |
| 33 |
|
| 34 |
public function isFirst(): bool |
| 35 |
{ |
| 36 |
return false; |
| 37 |
} |
| 38 |
|
| 39 |
public function isLast(): bool |
| 40 |
{ |
| 41 |
return false; |
| 42 |
} |
| 43 |
|
| 44 |
public function getInformationalStatus(): ?array |
| 45 |
{ |
| 46 |
return null; |
| 47 |
} |
| 48 |
|
| 49 |
public function getContent(): string |
| 50 |
{ |
| 51 |
return $this->content; |
| 52 |
} |
| 53 |
|
| 54 |
public function getOffset(): int |
| 55 |
{ |
| 56 |
return $this->offset; |
| 57 |
} |
| 58 |
|
| 59 |
public function getError(): ?string |
| 60 |
{ |
| 61 |
return null; |
| 62 |
} |
| 63 |
} |