annotate modules/contrib/migrate_plus/src/DataFetcherPluginInterface.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents a9cd425dd02b
children
rev   line source
Chris@0 1 <?php
Chris@0 2
Chris@0 3 namespace Drupal\migrate_plus;
Chris@0 4
Chris@0 5 /**
Chris@0 6 * Defines an interface for data fetchers.
Chris@0 7 *
Chris@0 8 * @see \Drupal\migrate_plus\Annotation\DataFetcher
Chris@0 9 * @see \Drupal\migrate_plus\DataFetchPluginBase
Chris@0 10 * @see \Drupal\migrate_plus\DataFetcherPluginManager
Chris@0 11 * @see plugin_api
Chris@0 12 */
Chris@0 13 interface DataFetcherPluginInterface {
Chris@0 14
Chris@0 15 /**
Chris@0 16 * Set the client headers.
Chris@0 17 *
Chris@4 18 * @param array $headers
Chris@0 19 * An array of the headers to set on the HTTP request.
Chris@0 20 */
Chris@0 21 public function setRequestHeaders(array $headers);
Chris@0 22
Chris@0 23 /**
Chris@0 24 * Get the currently set request headers.
Chris@0 25 */
Chris@0 26 public function getRequestHeaders();
Chris@0 27
Chris@0 28 /**
Chris@0 29 * Return content.
Chris@0 30 *
Chris@4 31 * @param string $url
Chris@0 32 * URL to retrieve from.
Chris@0 33 *
Chris@0 34 * @return string
Chris@0 35 * Content at the given url.
Chris@0 36 */
Chris@0 37 public function getResponseContent($url);
Chris@0 38
Chris@0 39 /**
Chris@0 40 * Return Http Response object for a given url.
Chris@0 41 *
Chris@4 42 * @param string $url
Chris@0 43 * URL to retrieve from.
Chris@0 44 *
Chris@0 45 * @return \Psr\Http\Message\ResponseInterface
Chris@4 46 * The HTTP response message.
Chris@0 47 */
Chris@0 48 public function getResponse($url);
Chris@0 49
Chris@0 50 }