1 | <?php |
||
8 | final class TraceableClient implements RpcClientInterface |
||
9 | { |
||
10 | const CATEGORY_REQUEST = 'rpc_call'; |
||
11 | const CATEGORY_RESPONSE = 'rpc_response'; |
||
12 | |||
13 | /** @var RpcClientInterface */ |
||
14 | private $client; |
||
15 | /** @var Stopwatch */ |
||
16 | private $stopwatch; |
||
17 | /** @var string */ |
||
18 | private $clientName; |
||
19 | |||
20 | /** |
||
21 | * TraceableClient constructor. |
||
22 | * |
||
23 | * @param RpcClientInterface $client |
||
24 | * @param Stopwatch $stopwatch |
||
25 | * @param string $clientName |
||
26 | */ |
||
27 | 2 | public function __construct(RpcClientInterface $client, Stopwatch $stopwatch, $clientName = 'api_client') |
|
33 | |||
34 | /** {@inheritdoc} */ |
||
35 | 2 | public function invoke($calls) |
|
47 | } |
||
48 |