Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. HttpDownloader.php

function HttpDownloader::canUseCurl

Parameters

Job $job:

1 call to HttpDownloader::canUseCurl()
HttpDownloader::addJob in vendor/composer/composer/src/Composer/Util/HttpDownloader.php
@phpstan-param Request $request

File

vendor/composer/composer/src/Composer/Util/HttpDownloader.php, line 527

Class

HttpDownloader
@author Jordi Boggiano <j.boggiano@seld.be> @phpstan-type Request array{url: non-empty-string, options: mixed[], copyTo: string|null} @phpstan-type Job array{id: int, status: int, request: Request, sync: bool, origin: string, resolve?: callable,…

Namespace

Composer\Util

Code

private function canUseCurl(array $job) : bool {
    if (!$this->curl) {
        return false;
    }
    if (!Preg::isMatch('{^https?://}i', $job['request']['url'])) {
        return false;
    }
    if (!empty($job['request']['options']['ssl']['allow_self_signed'])) {
        return false;
    }
    return true;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal