You are here

public function FeedsEnclosure::getContent in Feeds 7.2

Same name and namespace in other branches
  1. 6 plugins/FeedsParser.inc \FeedsEnclosure::getContent()
  2. 7 plugins/FeedsParser.inc \FeedsEnclosure::getContent()

Downloads the content from the file URL.

Return value

string The content of the referenced resource.

Throws

FeedsHTTPRequestException In case the result code of the HTTP request is not in the 2xx series.

1 call to FeedsEnclosure::getContent()
FeedsEnclosure::getFile in plugins/FeedsParser.inc
Get a Drupal file object of the enclosed resource, download if necessary.

File

plugins/FeedsParser.inc, line 445
Contains FeedsParser and related classes.

Class

FeedsEnclosure
Enclosure element, can be part of the result array.

Code

public function getContent() {
  feeds_include_library('http_request.inc', 'http_request');
  $result = feeds_http_request($this
    ->getUrlEncodedValue());
  http_request_check_result($this
    ->getUrlEncodedValue(), $result);
  return $result->data;
}