1 | <?php |
||
13 | class Download implements RobotsTxtInterface |
||
14 | { |
||
15 | use UrlParser; |
||
16 | |||
17 | private $response; |
||
18 | |||
19 | /** |
||
20 | * Download constructor. |
||
21 | * |
||
22 | * @param string $url |
||
23 | */ |
||
24 | public function __construct($url) |
||
35 | |||
36 | /** |
||
37 | * Status code |
||
38 | * |
||
39 | * @return int |
||
40 | */ |
||
41 | public function getStatusCode() |
||
45 | |||
46 | /** |
||
47 | * Encoding |
||
48 | * |
||
49 | * @return string |
||
50 | */ |
||
51 | public function getEncoding() |
||
62 | |||
63 | /** |
||
64 | * Manually detect encoding |
||
65 | * |
||
66 | * @return string |
||
67 | */ |
||
68 | protected function detectEncoding() |
||
75 | |||
76 | /** |
||
77 | * URL content |
||
78 | * |
||
79 | * @return string |
||
80 | */ |
||
81 | public function getBody() |
||
85 | } |
||
86 |