Composer API
Class

Composer\Util\StreamContextFactory

class StreamContextFactory

Allows the creation of a basic context supporting http proxy

Methods

static resource getContext(string $url, array $defaultOptions = array(), array $defaultParams = array())

Creates a context supporting HTTP proxies

Details

at line 34
static public resource getContext(string $url, array $defaultOptions = array(), array $defaultParams = array())

Creates a context supporting HTTP proxies

Parameters

string $url URL the context is to be used for
array $defaultOptions Options to merge with the default
array $defaultParams Parameters to specify on the context

Return Value

resource Default context

Exceptions

RuntimeException if https proxy required and OpenSSL uninstalled