PHP Class Swap\Builder

Author: Florian Voutzinos ([email protected])
Mostra file Open project: florianv/swap

Public Methods

Method Description
__construct ( array $options = [] ) Constructor.
add ( string $serviceName, array $options = [] ) : Builder Adds a service.
build ( ) : Swap Builds Swap.
useCacheItemPool ( Psr\Cache\CacheItemPoolInterface $cacheItemPool ) : Builder Uses the given cache item pool.
useHttpClient ( Http\Client\HttpClient $httpClient ) : Builder Uses the given http client.
useRequestFactory ( Http\Message\RequestFactory $requestFactory ) : Builder Uses the given request factory.

Method Details

__construct() public method

Constructor.
public __construct ( array $options = [] )
$options array

add() public method

Adds a service.
public add ( string $serviceName, array $options = [] ) : Builder
$serviceName string
$options array
return Builder

build() public method

Builds Swap.
public build ( ) : Swap
return Swap

useCacheItemPool() public method

Uses the given cache item pool.
public useCacheItemPool ( Psr\Cache\CacheItemPoolInterface $cacheItemPool ) : Builder
$cacheItemPool Psr\Cache\CacheItemPoolInterface
return Builder

useHttpClient() public method

Uses the given http client.
public useHttpClient ( Http\Client\HttpClient $httpClient ) : Builder
$httpClient Http\Client\HttpClient
return Builder

useRequestFactory() public method

Uses the given request factory.
public useRequestFactory ( Http\Message\RequestFactory $requestFactory ) : Builder
$requestFactory Http\Message\RequestFactory
return Builder