function UpdateFetcher::__construct

Same name and namespace in other branches
  1. 11.x core/modules/update/src/UpdateFetcher.php \Drupal\update\UpdateFetcher::__construct()
  2. 10 core/modules/update/src/UpdateFetcher.php \Drupal\update\UpdateFetcher::__construct()
  3. 9 core/modules/update/src/UpdateFetcher.php \Drupal\update\UpdateFetcher::__construct()
  4. 8.9.x core/modules/update/src/UpdateFetcher.php \Drupal\update\UpdateFetcher::__construct()

File

core/modules/update/src/UpdateFetcher.php, line 47

Class

UpdateFetcher
Fetches project information from remote locations.

Namespace

Drupal\update

Code

public function __construct(ConfigFactoryInterface $config_factory, protected ClientInterface $httpClient, Settings $settings, #[Autowire(service: 'logger.channel.update')] protected LoggerInterface $logger) {
  $this->fetchUrl = $config_factory->get('update.settings')
    ->get('fetch.url');
  $this->updateSettings = $config_factory->get('update.settings');
  $this->withHttpFallback = $settings->get('update_fetch_with_http_fallback', FALSE);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.