1 | <?php |
||
15 | class WebResource implements HttpResource |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * @var Url $url |
||
20 | */ |
||
21 | private $url; |
||
22 | |||
23 | /** |
||
24 | * @var mixed |
||
25 | */ |
||
26 | private $content; |
||
27 | |||
28 | /** |
||
29 | * @var ClientInterface |
||
30 | */ |
||
31 | private $httpClient; |
||
32 | |||
33 | /** |
||
34 | * WebResource constructor. |
||
35 | * |
||
36 | * @var Url $url |
||
37 | * @var ClientInterface $client |
||
38 | */ |
||
39 | public function __construct(Url $url, ClientInterface $httpClient) |
||
44 | |||
45 | /** |
||
46 | * @return Url |
||
47 | */ |
||
48 | public function getURI() |
||
52 | |||
53 | /** |
||
54 | * @return string |
||
55 | * @throws \Exception |
||
56 | */ |
||
57 | public function getContent() |
||
65 | |||
66 | /** |
||
67 | * @return mixed |
||
68 | * @throws \Exception |
||
69 | */ |
||
70 | private function fetchContent() |
||
75 | |||
76 | } |