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

Breadcrumb

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

function RequestProxy::getStatus

Returns proxy info associated with this request

An empty return value means that the user has not set a proxy. A non-empty value will either be the sanitized proxy url if a proxy is required, or a message indicating that a no_proxy value has disabled the proxy.

Parameters

?string $format Output format specifier:

File

vendor/composer/composer/src/Composer/Util/Http/RequestProxy.php, line 117

Class

RequestProxy
@internal @author John Stevenson <john-stevenson@blueyonder.co.uk>

Namespace

Composer\Util\Http

Code

public function getStatus(?string $format = null) : string {
    if ($this->status === null) {
        return '';
    }
    $format = $format ?? '%s';
    if (strpos($format, '%s') !== false) {
        return sprintf($format, $this->status);
    }
    throw new \InvalidArgumentException('String format specifier is missing');
}

API Navigation

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