5 use dokuwiki\HTTP\DokuHTTPClient
;
8 * Fetch an URL using our own HTTPClient
10 * Replaces SimplePie's own class
12 class FeedParserFile
extends \SimplePie_File
15 /** @noinspection PhpMissingParentConstructorInspection */
18 * Inititializes the HTTPClient
20 * We ignore all given parameters - they are set in DokuHTTPClient
24 public function __construct(
30 $force_fsockopen = false,
31 $curl_options = array()
33 $this->http
= new DokuHTTPClient();
34 $this->success
= $this->http
->sendRequest($url);
36 $this->headers
= $this->http
->resp_headers
;
37 $this->body
= $this->http
->resp_body
;
38 $this->error
= $this->http
->error
;
40 $this->method
= SIMPLEPIE_FILE_SOURCE_REMOTE | SIMPLEPIE_FILE_SOURCE_FSOCKOPEN
;
42 return $this->success
;
46 public function headers()
48 return $this->headers
;
52 public function body()
58 public function close()