function UpdateFetcher::fetchProjectData
Same name in other branches
- 9 core/modules/update/src/UpdateFetcher.php \Drupal\update\UpdateFetcher::fetchProjectData()
- 10 core/modules/update/src/UpdateFetcher.php \Drupal\update\UpdateFetcher::fetchProjectData()
- 11.x core/modules/update/src/UpdateFetcher.php \Drupal\update\UpdateFetcher::fetchProjectData()
Overrides UpdateFetcherInterface::fetchProjectData
File
-
core/
modules/ update/ src/ UpdateFetcher.php, line 60
Class
- UpdateFetcher
- Fetches project information from remote locations.
Namespace
Drupal\updateCode
public function fetchProjectData(array $project, $site_key = '') {
$url = $this->buildFetchUrl($project, $site_key);
$data = '';
try {
$data = (string) $this->httpClient
->get($url, [
'headers' => [
'Accept' => 'text/xml',
],
])
->getBody();
} catch (RequestException $exception) {
watchdog_exception('update', $exception);
}
return $data;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.