class Factory (View source)

Properties

protected Application $app

Methods

__construct(Application $app)

No description

array
getOptions(Repository $config)

Read the HTTP Client configuration.

createFromConfig(Repository $config, string|object|null $adapter = null)

Create a new HTTP Client instance starting from configuration.

createFromOptions(array $options, mixed $handler = null)

Create a new HTTP Client instance starting from configuration.

array
getDefaultOptions(Repository $config)

Get the default options for the HTTP client.

Details

__construct(Application $app)

No description

Parameters

Application $app

protected array getOptions(Repository $config)

Read the HTTP Client configuration.

Parameters

Repository $config

Return Value

array

{ @var bool $sslverifypeer [always] @var string $proxyhost [optional] @var int $proxyport [optional] @var string $proxyuser [optional] @var string $proxypass [optional] ... and all other options set in app.curl }

Client createFromConfig(Repository $config, string|object|null $adapter = null)

Create a new HTTP Client instance starting from configuration.

Parameters

Repository $config
string|object|null $adapter

Return Value

Client

Client createFromOptions(array $options, mixed $handler = null)

Create a new HTTP Client instance starting from configuration.

Parameters

array $options

See the app.http_client values at concrete/config/app.php, plus the concrete.proxy values at concrete/config/concrete.php.

mixed $handler

Optionally specify a specific handler.

Return Value

Client

array getDefaultOptions(Repository $config)

Get the default options for the HTTP client.

Parameters

Repository $config

Return Value

array