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\HttpCode
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');
}