-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed: WaitGroup scalar initialization exception
- Loading branch information
Showing
2 changed files
with
221 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Ripple\Http\Client; | ||
|
||
use Exception; | ||
use GuzzleHttp\Psr7\Response; | ||
use Throwable; | ||
|
||
abstract class Capturer | ||
{ | ||
/** | ||
* 装载失败 | ||
* | ||
* @param Throwable|Exception $exception | ||
* | ||
* @return void | ||
*/ | ||
abstract public function onFail(Throwable|Exception $exception): void; | ||
|
||
/** | ||
* 请求发生异常 | ||
* | ||
* @param Throwable|Exception $exception | ||
* | ||
* @return void | ||
*/ | ||
abstract public function onError(Throwable|Exception $exception): void; | ||
|
||
|
||
/** | ||
* 请求完成 | ||
* | ||
* @param \GuzzleHttp\Psr7\Response $response | ||
* | ||
* @return void | ||
*/ | ||
abstract public function onComplete(Response $response): void; | ||
|
||
|
||
/** | ||
* 收到完整请求头 | ||
* | ||
* @param array $headers | ||
* | ||
* @return void | ||
*/ | ||
abstract public function processHeader(array $headers): void; | ||
|
||
/** | ||
* 填充内容时 | ||
* | ||
* @param string $content | ||
* | ||
* @return void | ||
*/ | ||
abstract public function processContent(string $content): void; | ||
|
||
/** | ||
* 装载成功 | ||
* | ||
* @return void | ||
*/ | ||
abstract public function onInject(): void; | ||
} |
Oops, something went wrong.