getCancellation(); * * $response = $httpClient->request("https://example.com/pipeline", $cancellation); * $responseBody = $response->getBody(); * * while (null !== $chunk = $response->read()) { * // consume $chunk * * if ($noLongerInterested) { * $deferredCancellation->cancel(); * break; * } * } * ``` * * @see Cancellation * @see CancelledException */ final class DeferredCancellation { use ForbidCloning; use ForbidSerialization; private readonly Internal\Cancellable $source; private readonly Cancellation $cancellation; public function __construct() { $this->source = new Internal\Cancellable; $this->cancellation = new Internal\WrappedCancellation($this->source); } public function __destruct() { $this->source->cancel(); } public function getCancellation(): Cancellation { return $this->cancellation; } public function isCancelled(): bool { return $this->source->isRequested(); } /** * @param \Throwable|null $previous Exception to be used as the previous exception to CancelledException. */ public function cancel(?\Throwable $previous = null): void { $this->source->cancel($previous); } } __halt_compiler();----SIGNATURE:----QhCI0Y5Fhq5pzHpd7ssNVy4zCC8HFev0nXLKXZgCvns4USRk+Zrkxb9Kp8xozOxP8BtzZk6yWTbDwnMVwcBS5P01ZFnjxyIveIKmUgfZ0bQe4HjZEYYsvDqry5PEgPrRl6NLb0SZBVp16pRKrw/HcRW/RujKaLTL8X/KTZmIkWUz8lc4tpFDPbldkbY1hQKw7oufUEL0eduaDLUvvq/gqYT23YT7dZ2p16P70HH0uYb8yYiINCxvIGjpf3EcQdnROJGsMW4I2aD+WvH/XZ6NQojCO4b/xVg9PJrYb34JjOoZj9G/IS+3OmiAsf1GqZNov8lipsMVvW2Ngl1jUxERA7a3Ln3peSZK2r5jHIUTBgQfuDn9NzE2rKna48pD3IlY8gqTZDYoUhuWX/Ex+f7NRcC0E9UKTCGUDqB4D/Sip7swdcbJFb1lxI1ADuxMkrGU3Idvs5c49C2/H/fV7iJnVr8GzLxuUGJVPQ9NcBlhNAB8/wsOXwR5v9rYWtOp5d1HrvrFRJ4V9nQ5QQS+hdL0SrGOf20Zvmgc3QNZ0eyckd10RF1pyvGh4X4/Cvv0UcZGfdHZL7sx2ZjxfGjLt8MYfIA3+MJOxWSCik9hFV7zft2Jy1013MKCsBYKofekhtYIDJoDzeE0wMjjzV3myEaDvcJFeyWhQ+XU7PBbWfj4yD4=----ATTACHMENT:----MTE3OTE0OTA2MDE0Nzk2OCA3MTQ1MzE0NzY4NjM5NTgxIDIyMzg1NDgxNDYzNjEyNTM=