You are here

interface DataFetcherPluginInterface in Migrate Plus 8

Same name and namespace in other branches
  1. 8.5 src/DataFetcherPluginInterface.php \Drupal\migrate_plus\DataFetcherPluginInterface
  2. 8.2 src/DataFetcherPluginInterface.php \Drupal\migrate_plus\DataFetcherPluginInterface
  3. 8.3 src/DataFetcherPluginInterface.php \Drupal\migrate_plus\DataFetcherPluginInterface
  4. 8.4 src/DataFetcherPluginInterface.php \Drupal\migrate_plus\DataFetcherPluginInterface

Defines an interface for data fetchers.

Hierarchy

Expanded class hierarchy of DataFetcherPluginInterface

All classes that implement DataFetcherPluginInterface

See also

\Drupal\migrate_plus\Annotation\DataFetcher

\Drupal\migrate_plus\DataFetchPluginBase

\Drupal\migrate_plus\DataFetcherPluginManager

Plugin API

File

src/DataFetcherPluginInterface.php, line 18
Contains \Drupal\migrate_plus\DataFetcherPluginInterface.

Namespace

Drupal\migrate_plus
View source
interface DataFetcherPluginInterface {

  /**
   * Set the client headers.
   *
   * @param $headers
   *   An array of the headers to set on the HTTP request.
   */
  public function setRequestHeaders(array $headers);

  /**
   * Get the currently set request headers.
   */
  public function getRequestHeaders();

  /**
   * Return content.
   *
   * @param $url
   *   URL to retrieve from.
   *
   * @return string
   *   Content at the given url.
   */
  public function getResponseContent($url);

  /**
   * Return Http Response object for a given url.
   *
   * @param $url
   *   URL to retrieve from.
   *
   * @return \Psr\Http\Message\ResponseInterface
   */
  public function getResponse($url);

}

Members

Namesort descending Modifiers Type Description Overrides
DataFetcherPluginInterface::getRequestHeaders public function Get the currently set request headers. 1
DataFetcherPluginInterface::getResponse public function Return Http Response object for a given url. 1
DataFetcherPluginInterface::getResponseContent public function Return content. 1
DataFetcherPluginInterface::setRequestHeaders public function Set the client headers. 1