1 | <?php |
||
2 | /** |
||
3 | * User agent info |
||
4 | * User: moyo |
||
5 | * Date: 2018/7/23 |
||
6 | * Time: 2:46 PM |
||
7 | */ |
||
8 | |||
9 | namespace Carno\HRPC\Client; |
||
10 | |||
11 | class Agent |
||
12 | { |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | private $present = null; |
||
17 | |||
18 | /** |
||
19 | * Agent constructor. |
||
20 | */ |
||
21 | public function __construct() |
||
22 | { |
||
23 | $this->present = sprintf( |
||
24 | 'Carno-RPC/1.0 (%s %s; PHP %s) SWOOLE/%s', |
||
25 | php_uname('s'), |
||
26 | php_uname('r'), |
||
27 | PHP_VERSION, |
||
28 | SWOOLE_VERSION |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
29 | ); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @return string |
||
34 | */ |
||
35 | public function info() : string |
||
36 | { |
||
37 | return $this->present; |
||
38 | } |
||
39 | } |
||
40 |