6 use SimplePie\SimplePie
;
7 use dokuwiki\HTTP\DokuHTTPClient
;
10 * Fetch an URL using our own HTTPClient
12 * Replaces SimplePie's own class
14 class FeedParserFile
extends File
17 /** @noinspection PhpMissingParentConstructorInspection */
20 * Inititializes the HTTPClient
22 * We ignore all given parameters - they are set in DokuHTTPClient
26 public function __construct(
29 $this->http
= new DokuHTTPClient();
30 $this->success
= $this->http
->sendRequest($url);
32 $this->headers
= $this->http
->resp_headers
;
33 $this->body
= $this->http
->resp_body
;
34 $this->error
= $this->http
->error
;
36 $this->method
= SimplePie
::FILE_SOURCE_REMOTE | SimplePie
::FILE_SOURCE_FSOCKOPEN
;
38 return $this->success
;
42 public function headers()
44 return $this->headers
;
48 public function body()
54 public function close()