1 | <?php |
||
19 | class Browser |
||
20 | { |
||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private $host; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $api_prefix; |
||
30 | |||
31 | /** |
||
32 | * @var Client |
||
33 | */ |
||
34 | private $client; |
||
35 | |||
36 | /** |
||
37 | * @param Client $client |
||
38 | * @param string $host |
||
39 | * @param string $api_prefix |
||
40 | */ |
||
41 | 7 | public function __construct(Client $client, $host, $api_prefix) |
|
42 | { |
||
43 | 7 | $this->client = $client; |
|
44 | 7 | $this->host = $host; |
|
45 | 7 | $this->api_prefix = $api_prefix; |
|
46 | 7 | } |
|
47 | |||
48 | /** |
||
49 | * @return string |
||
50 | */ |
||
51 | 1 | public function getHost() |
|
52 | { |
||
53 | 1 | return $this->host; |
|
54 | } |
||
55 | |||
56 | /** |
||
57 | * @return string |
||
58 | */ |
||
59 | 1 | public function getApiHost() |
|
63 | |||
64 | /** |
||
65 | * @param int $timeout |
||
66 | * |
||
67 | * @return Browser |
||
68 | */ |
||
69 | 1 | public function setTimeout($timeout) |
|
75 | |||
76 | /** |
||
77 | * @param int $proxy |
||
78 | * |
||
79 | * @return Browser |
||
80 | */ |
||
81 | 1 | public function setProxy($proxy) |
|
87 | |||
88 | /** |
||
89 | * Get data from path. |
||
90 | * |
||
91 | * @param string $path |
||
92 | * |
||
93 | * @return array |
||
94 | */ |
||
95 | 3 | public function get($path) |
|
110 | } |
||
111 |