1 | <?php |
||
20 | class Browser |
||
21 | { |
||
22 | /** |
||
23 | * @var ClientInterface |
||
24 | */ |
||
25 | protected $client; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $host; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $api_host; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | */ |
||
40 | protected $image_prefix; |
||
41 | |||
42 | /** |
||
43 | * @param ClientInterface $client |
||
44 | * @param string $host |
||
45 | * @param string $api_host |
||
46 | * @param string $image_prefix |
||
47 | */ |
||
48 | 7 | public function __construct(ClientInterface $client, $host, $api_host, $image_prefix) |
|
55 | |||
56 | /** |
||
57 | * @return string |
||
58 | */ |
||
59 | 1 | public function getHost() |
|
63 | |||
64 | /** |
||
65 | * @return string |
||
66 | */ |
||
67 | 1 | public function getApiHost() |
|
71 | |||
72 | /** |
||
73 | * @param int $timeout |
||
74 | * |
||
75 | * @return Browser |
||
76 | */ |
||
77 | 1 | public function setTimeout($timeout) |
|
83 | |||
84 | /** |
||
85 | * @param string $proxy |
||
86 | * |
||
87 | * @return Browser |
||
88 | */ |
||
89 | 1 | public function setProxy($proxy) |
|
95 | |||
96 | /** |
||
97 | * @param string $request |
||
98 | * @param array $params |
||
99 | * |
||
100 | * @return string |
||
101 | */ |
||
102 | 2 | public function getContent($request, array $params = []) |
|
106 | |||
107 | /** |
||
108 | * @param string $request |
||
109 | * @param array $params |
||
110 | * |
||
111 | * @return Crawler |
||
112 | */ |
||
113 | 1 | public function getCrawler($request, array $params = []) |
|
117 | |||
118 | /** |
||
119 | * @param string $image |
||
120 | * |
||
121 | * @return string |
||
122 | */ |
||
123 | 1 | public function getImageUrl($image) |
|
127 | } |
||
128 |