]> git.immae.eu Git - github/shaarli/Shaarli.git/blob - application/http/HttpAccess.php
81d9e0762862f5265c65de6058b6fa911a4d7033
[github/shaarli/Shaarli.git] / application / http / HttpAccess.php
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Shaarli\Http;
6
7 /**
8 * Class HttpAccess
9 *
10 * This is mostly an OOP wrapper for HTTP functions defined in `HttpUtils`.
11 * It is used as dependency injection in Shaarli's container.
12 *
13 * @package Shaarli\Http
14 */
15 class HttpAccess
16 {
17 public function getHttpResponse($url, $timeout = 30, $maxBytes = 4194304, $curlWriteFunction = null)
18 {
19 return get_http_response($url, $timeout, $maxBytes, $curlWriteFunction);
20 }
21
22 public function getCurlDownloadCallback(
23 &$charset,
24 &$title,
25 &$description,
26 &$keywords,
27 $retrieveDescription,
28 $curlGetInfo = 'curl_getinfo'
29 ) {
30 return get_curl_download_callback(
31 $charset,
32 $title,
33 $description,
34 $keywords,
35 $retrieveDescription,
36 $curlGetInfo
37 );
38 }
39 }