You are here

class HttpFetcherResult in Feeds 8.3

The default fetcher result object.

Hierarchy

Expanded class hierarchy of HttpFetcherResult

1 file declares its use of HttpFetcherResult
HttpFetcher.php in src/Feeds/Fetcher/HttpFetcher.php

File

src/Result/HttpFetcherResult.php, line 8

Namespace

Drupal\feeds\Result
View source
class HttpFetcherResult extends FetcherResult implements HttpFetcherResultInterface {

  /**
   * The HTTP headers.
   *
   * @var array
   */
  protected $headers;

  /**
   * Constructs an HttpFetcherResult object.
   *
   * @param string $file_path
   *   The path to the result file.
   * @param array $headers
   *   An array of HTTP headers.
   */
  public function __construct($file_path, array $headers) {
    parent::__construct($file_path);
    $this->headers = array_change_key_case($headers);
  }

  /**
   * {@inheritdoc}
   */
  public function getHeaders() {
    return $this->headers;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FetcherResult::$filePath protected property The filepath of the fetched item.
FetcherResult::checkFile protected function Checks that a file exists and is readable.
FetcherResult::getFilePath public function Returns the path to the file containing the file provided by the fetcher. Overrides FetcherResultInterface::getFilePath 1
FetcherResult::getRaw public function Returns the file provided by the fetcher as a string. Overrides FetcherResultInterface::getRaw 1
FetcherResult::sanitizeFile protected function Sanitizes the file in place.
FetcherResult::sanitizeRaw protected function Sanitizes the raw content string.
HttpFetcherResult::$headers protected property The HTTP headers.
HttpFetcherResult::getHeaders public function Returns the headers. Overrides HttpFetcherResultInterface::getHeaders
HttpFetcherResult::__construct public function Constructs an HttpFetcherResult object. Overrides FetcherResult::__construct