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){ |
||
49 | |||
50 | /** |
||
51 | * @param string $url |
||
52 | * |
||
53 | * @return \chillerlan\TinyCurl\Response\Response |
||
54 | */ |
||
55 | protected function getResponse($url){ |
||
60 | |||
61 | /** |
||
62 | * @return void |
||
63 | */ |
||
64 | protected function initCurl(){ |
||
81 | /** |
||
82 | * @param \chillerlan\TinyCurl\URL $url |
||
83 | * @param array $curl_options |
||
84 | * |
||
85 | * @return \chillerlan\TinyCurl\Response\Response |
||
86 | * @throws \chillerlan\TinyCurl\RequestException |
||
87 | */ |
||
88 | public function fetch(URL $url, array $curl_options = []){ |
||
118 | |||
119 | /** |
||
120 | * @param string $url |
||
121 | * |
||
122 | * @return array<string> |
||
123 | */ |
||
124 | public function extractShortUrl($url){ |
||
133 | |||
134 | /** |
||
135 | * @param string $url |
||
136 | * |
||
137 | * @return string |
||
138 | * @link http://www.internoetics.com/2012/11/12/resolve-short-urls-to-their-destination-url-php-api/ |
||
139 | */ |
||
140 | protected function extract($url){ |
||
164 | |||
165 | } |
||
166 |