class FeedsHTTPFetcherAppendHeadersResult in Feeds HTTPFetcher Append Headers 7
Result of FeedsHTTPFetcherAppendHeaders::fetch().
Hierarchy
- class \FeedsResult
- class \FeedsFetcherResult
Expanded class hierarchy of FeedsHTTPFetcherAppendHeadersResult
File
- plugins/
FeedsHTTPFetcherAppendHeaders.inc, line 11 - Home of the FeedsHTTPFetcherAppendHeaders and related classes.
View source
class FeedsHTTPFetcherAppendHeadersResult extends FeedsFetcherResult {
protected $url;
protected $file_path;
protected $timeout;
protected $append_headers;
/**
* Constructor.
*/
public function __construct($url = NULL, $append_headers = '') {
$this->url = $url;
$this->append_headers = $append_headers;
parent::__construct('');
}
/**
* Overrides FeedsFetcherResult::getRaw();
*/
public function getRaw() {
feeds_include_library('http_request.inc', 'http_request');
module_load_include('inc', 'feeds_httpfetcher_append_headers', 'libraries/feeds_httpfetcher_append_headers_request');
$result = feeds_httpfetcher_append_headers_request_get($this->url, NULL, NULL, TRUE, $this->timeout, $this->append_headers);
if (!in_array($result->code, array(
200,
201,
202,
203,
204,
205,
206,
))) {
throw new Exception(t('Download of @url failed with code !code.', array(
'@url' => $this->url,
'!code' => $result->code,
)));
}
return $this
->sanitizeRaw($result->data);
}
public function getTimeout() {
return $this->timeout;
}
public function setTimeout($timeout) {
$this->timeout = $timeout;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FeedsFetcherResult:: |
protected | property | The raw fetched data. | |
FeedsFetcherResult:: |
protected | function | Checks that a file exists and is readable. | |
FeedsFetcherResult:: |
public | function | Constructs file name for saving the raw data. | |
FeedsFetcherResult:: |
public | function | Returns if the file to parse exists. | |
FeedsFetcherResult:: |
public | function | Returns directory for storing files that are in progress of import. | |
FeedsFetcherResult:: |
public | function | Returns the contents of a file, if it exists. | |
FeedsFetcherResult:: |
public | function | Get a path to a temporary file containing the resource provided by the fetcher. | 1 |
FeedsFetcherResult:: |
public | function | Returns if raw data exists. | |
FeedsFetcherResult:: |
public | function | Sanitize the file in place. | |
FeedsFetcherResult:: |
public | function | Sanitize the raw content string. | |
FeedsFetcherResult:: |
public | function | Sanitize the raw content string. | |
FeedsFetcherResult:: |
public | function | Saves the raw fetcher result to a file. | |
FeedsFetcherResult:: |
public | function | Prevent saving the raw result when serializing object. | |
FeedsHTTPFetcherAppendHeadersResult:: |
protected | property | ||
FeedsHTTPFetcherAppendHeadersResult:: |
protected | property |
The path to a file where the raw data is stored. Overrides FeedsFetcherResult:: |
|
FeedsHTTPFetcherAppendHeadersResult:: |
protected | property | ||
FeedsHTTPFetcherAppendHeadersResult:: |
protected | property | ||
FeedsHTTPFetcherAppendHeadersResult:: |
public | function |
Overrides FeedsFetcherResult::getRaw(); Overrides FeedsFetcherResult:: |
|
FeedsHTTPFetcherAppendHeadersResult:: |
public | function | ||
FeedsHTTPFetcherAppendHeadersResult:: |
public | function | ||
FeedsHTTPFetcherAppendHeadersResult:: |
public | function |
Constructor. Overrides FeedsFetcherResult:: |