Final Class Yiisoft\Yii\Debug\Collector\HttpClientInterfaceProxy
| Inheritance | Yiisoft\ |
|---|---|
| Implements | Psr\ |
| Uses Traits | Yiisoft\ |
Public Methods
Method Details
Defined in:
Yiisoft\
| public mixed __call ( string $name, array $arguments ) | ||
| $name | string | |
| $arguments | array | |
public function __call(string $name, array $arguments)
{
/**
* @psalm-suppress MixedMethodCall
*/
return $this->decorated->$name(...$arguments);
}
| public mixed __construct ( \ | ||
| $decorated | \ |
|
| $collector | Yiisoft\ |
|
public function __construct(
private readonly ClientInterface $decorated,
private readonly HttpClientCollector $collector,
) {}
Defined in:
Yiisoft\
| public mixed __get ( string $name ) | ||
| $name | string | |
public function __get(string $name)
{
return $this->decorated->$name;
}
Defined in:
Yiisoft\
| public void __set ( string $name, mixed $value ) | ||
| $name | string | |
| $value | mixed | |
public function __set(string $name, mixed $value): void
{
$this->decorated->$name = $value;
}
| public \ | ||
| $request | \ |
|
public function sendRequest(RequestInterface $request): ResponseInterface
{
/** @psalm-var array{file: string, line: int} $callStack */
$callStack = debug_backtrace()[0];
$uniqueId = random_bytes(36);
$startTime = microtime(true);
$this->collector->collect($request, $startTime, $callStack['file'] . ':' . $callStack['line'], $uniqueId);
$response = null;
try {
$response = $this->decorated->sendRequest($request);
} finally {
$endTime = microtime(true);
$this->collector->collectTotalTime($response, $endTime, $uniqueId);
}
return $response;
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.