You are here

class InstagramFeedsPluginsPagerResult in Instagram Feeds 7

Result of FeedsHTTPFetcher::fetch().

Hierarchy

Expanded class hierarchy of InstagramFeedsPluginsPagerResult

File

modules/instagram_feeds_plugins/plugins/feeds/InstagramFeedsPluginsPager.inc, line 11
Home of the InstagramFeedsPluginsPager.

View source
class InstagramFeedsPluginsPagerResult extends FeedsFetcherResult {
  protected $url;

  /**
   * Constructor.
   */
  public function __construct($url = NULL) {
    $this->url = $url;
    parent::__construct('');
  }

  /**
   * Overrides FeedsFetcherResult::getRaw().
   */
  public function getRaw() {
    feeds_include_library('http_request.inc', 'http_request');
    $result = http_request_get($this->url, NULL, NULL, TRUE);
    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);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FeedsFetcherResult::$file_path protected property The path to a file where the raw data is stored.
FeedsFetcherResult::$raw protected property The raw fetched data.
FeedsFetcherResult::checkFile protected function Checks that a file exists and is readable.
FeedsFetcherResult::constructFilePath public function Constructs file name for saving the raw data.
FeedsFetcherResult::fileExists public function Returns if the file to parse exists.
FeedsFetcherResult::getFeedsInProgressDir public function Returns directory for storing files that are in progress of import.
FeedsFetcherResult::getFileContents public function Returns the contents of a file, if it exists.
FeedsFetcherResult::getFilePath public function Get a path to a temporary file containing the resource provided by the fetcher. 1
FeedsFetcherResult::rawExists public function Returns if raw data exists.
FeedsFetcherResult::sanitizeFile public function Sanitize the file in place.
FeedsFetcherResult::sanitizeRaw public function Sanitize the raw content string.
FeedsFetcherResult::sanitizeRawOptimized public function Sanitize the raw content string.
FeedsFetcherResult::saveRawToFile public function Saves the raw fetcher result to a file.
FeedsFetcherResult::__sleep public function Prevent saving the raw result when serializing object.
InstagramFeedsPluginsPagerResult::$url protected property
InstagramFeedsPluginsPagerResult::getRaw public function Overrides FeedsFetcherResult::getRaw(). Overrides FeedsFetcherResult::getRaw
InstagramFeedsPluginsPagerResult::__construct public function Constructor. Overrides FeedsFetcherResult::__construct