Mercurial > hg > cmmr2012-drupal-site
comparison modules/contrib/migrate_plus/src/DataFetcherPluginInterface.php @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children | a9cd425dd02b |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c75dbcec494b |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\migrate_plus; | |
4 | |
5 /** | |
6 * Defines an interface for data fetchers. | |
7 * | |
8 * @see \Drupal\migrate_plus\Annotation\DataFetcher | |
9 * @see \Drupal\migrate_plus\DataFetchPluginBase | |
10 * @see \Drupal\migrate_plus\DataFetcherPluginManager | |
11 * @see plugin_api | |
12 */ | |
13 interface DataFetcherPluginInterface { | |
14 | |
15 /** | |
16 * Set the client headers. | |
17 * | |
18 * @param $headers | |
19 * An array of the headers to set on the HTTP request. | |
20 */ | |
21 public function setRequestHeaders(array $headers); | |
22 | |
23 /** | |
24 * Get the currently set request headers. | |
25 */ | |
26 public function getRequestHeaders(); | |
27 | |
28 /** | |
29 * Return content. | |
30 * | |
31 * @param $url | |
32 * URL to retrieve from. | |
33 * | |
34 * @return string | |
35 * Content at the given url. | |
36 */ | |
37 public function getResponseContent($url); | |
38 | |
39 /** | |
40 * Return Http Response object for a given url. | |
41 * | |
42 * @param $url | |
43 * URL to retrieve from. | |
44 * | |
45 * @return \Psr\Http\Message\ResponseInterface | |
46 */ | |
47 public function getResponse($url); | |
48 | |
49 } |