1 | <?php |
||
12 | class Download implements RobotsTxtInterface |
||
13 | { |
||
14 | use UrlTools; |
||
15 | |||
16 | private $response; |
||
17 | |||
18 | /** |
||
19 | * Download constructor. |
||
20 | * |
||
21 | * @param string $url |
||
22 | */ |
||
23 | public function __construct($url) |
||
33 | |||
34 | /** |
||
35 | * Status code |
||
36 | * |
||
37 | * @return int |
||
38 | */ |
||
39 | public function getStatusCode() |
||
43 | |||
44 | /** |
||
45 | * Encoding |
||
46 | * |
||
47 | * @return string |
||
48 | */ |
||
49 | public function getEncoding() |
||
60 | |||
61 | /** |
||
62 | * Manually detect encoding |
||
63 | * |
||
64 | * @return string |
||
65 | */ |
||
66 | protected function detectEncoding() |
||
73 | |||
74 | /** |
||
75 | * URL content |
||
76 | * |
||
77 | * @return string |
||
78 | */ |
||
79 | public function getBody() |
||
83 | } |
||
84 |