function RemoteFilesystem::__construct
Constructor.
Parameters
IOInterface $io The IO instance:
Config $config The config:
mixed[] $options The options:
AuthHelper $authHelper:
File
-
vendor/
composer/ composer/ src/ Composer/ Util/ RemoteFilesystem.php, line 76
Class
- RemoteFilesystem
- @internal @author François Pluchino <francois.pluchino@opendisplay.com> @author Jordi Boggiano <j.boggiano@seld.be> @author Nils Adermann <naderman@naderman.de>
Namespace
Composer\UtilCode
public function __construct(IOInterface $io, Config $config, array $options = [], bool $disableTls = false, ?AuthHelper $authHelper = null) {
$this->io = $io;
// Setup TLS options
// The cafile option can be set via config.json
if ($disableTls === false) {
$this->options = StreamContextFactory::getTlsDefaults($options, $io);
}
else {
$this->disableTls = true;
}
// handle the other externally set options normally.
$this->options = array_replace_recursive($this->options, $options);
$this->config = $config;
$this->authHelper = $authHelper ?? new AuthHelper($io, $config);
}