1 | <?php |
||
20 | class Request{ |
||
21 | |||
22 | /** |
||
23 | * The cURL connection |
||
24 | * |
||
25 | * @var resource |
||
26 | */ |
||
27 | protected $curl; |
||
28 | |||
29 | /** |
||
30 | * @var \chillerlan\TinyCurl\RequestOptions |
||
31 | */ |
||
32 | protected $options; |
||
33 | |||
34 | /** |
||
35 | * Request constructor. |
||
36 | * |
||
37 | * @param \chillerlan\TinyCurl\RequestOptions|null $options |
||
38 | */ |
||
39 | public function __construct(RequestOptions $options = null){ |
||
42 | |||
43 | /** |
||
44 | * @param \chillerlan\TinyCurl\RequestOptions $options |
||
45 | */ |
||
46 | public function setOptions(RequestOptions $options){ |
||
57 | |||
58 | /** |
||
59 | * @param string $url |
||
60 | * |
||
61 | * @return \chillerlan\TinyCurl\Response\Response |
||
62 | */ |
||
63 | protected function getResponse($url){ |
||
68 | |||
69 | /** |
||
70 | * @param \chillerlan\TinyCurl\URL $url |
||
71 | * |
||
72 | * @return \chillerlan\TinyCurl\Response\Response |
||
73 | * @throws \chillerlan\TinyCurl\RequestException |
||
74 | */ |
||
75 | public function fetch(URL $url){ |
||
84 | |||
85 | /** |
||
86 | * @param string $url |
||
87 | * |
||
88 | * @return array<string> |
||
89 | */ |
||
90 | public function extractShortUrl($url){ |
||
99 | |||
100 | /** |
||
101 | * @param string $url |
||
102 | * |
||
103 | * @return string |
||
104 | * @link http://www.internoetics.com/2012/11/12/resolve-short-urls-to-their-destination-url-php-api/ |
||
105 | */ |
||
106 | protected function extract($url){ |
||
130 | |||
131 | } |
||
132 |