class ClientOptions

Methods

__construct()

ClientOptions constructor.

static ClientOptions
create()

No description

withDefaultLocale(string $locale)

No description

string|null
getDefaultLocale()

No description

usingDeliveryApi()

No description

usingPreviewApi()

No description

withHost(string $host)

No description

string
getHost()

No description

withCache(CacheItemPoolInterface $cacheItemPool, bool $autoWarmup = \false, bool $cacheContent = \false)

No description

CacheItemPoolInterface
getCacheItemPool()

No description

bool
hasCacheAutoWarmup()

No description

bool
hasCacheContent()

No description

withLogger(LoggerInterface $logger)

Configure the Client to use any PSR-3 compatible logger.

LoggerInterface
getLogger()

No description

withHttpClient(Client $client)

No description

Client
getHttpClient()

No description

withNormalResourcePool()

Configures the client to use the default resource pool implementation, which may use more memory in extreme scenarios (tens of thousands of resources).

withLowMemoryResourcePool()

Configures the client to use a resource pool which will not cache entries and assets, which is useful when handling tens of thousand of resources, but it may cause extra API calls in normal scenarios.

bool
usesLowMemoryResourcePool()

No description

Details

at line 65
__construct()

ClientOptions constructor.

at line 75
static ClientOptions create()

Return Value

ClientOptions

at line 85
ClientOptions withDefaultLocale(string $locale)

Parameters

string $locale

Return Value

ClientOptions

at line 95
string|null getDefaultLocale()

Return Value

string|null

at line 103
ClientOptions usingDeliveryApi()

Return Value

ClientOptions

at line 113
ClientOptions usingPreviewApi()

Return Value

ClientOptions

at line 125
ClientOptions withHost(string $host)

Parameters

string $host

Return Value

ClientOptions

at line 139
string getHost()

Return Value

string

at line 151
ClientOptions withCache(CacheItemPoolInterface $cacheItemPool, bool $autoWarmup = \false, bool $cacheContent = \false)

Parameters

CacheItemPoolInterface $cacheItemPool
bool $autoWarmup
bool $cacheContent

Return Value

ClientOptions

at line 166
CacheItemPoolInterface getCacheItemPool()

Return Value

CacheItemPoolInterface

at line 174
bool hasCacheAutoWarmup()

Return Value

bool

at line 182
bool hasCacheContent()

Return Value

bool

at line 194
ClientOptions withLogger(LoggerInterface $logger)

Configure the Client to use any PSR-3 compatible logger.

Parameters

LoggerInterface $logger

Return Value

ClientOptions

at line 204
LoggerInterface getLogger()

Return Value

LoggerInterface

at line 214
ClientOptions withHttpClient(Client $client)

Parameters

Client $client

Return Value

ClientOptions

at line 224
Client getHttpClient()

Return Value

Client

at line 235
ClientOptions withNormalResourcePool()

Configures the client to use the default resource pool implementation, which may use more memory in extreme scenarios (tens of thousands of resources).

Return Value

ClientOptions

at line 250
ClientOptions withLowMemoryResourcePool()

Configures the client to use a resource pool which will not cache entries and assets, which is useful when handling tens of thousand of resources, but it may cause extra API calls in normal scenarios.

Use this option only if the default resource pool is causing you memory errors.

Return Value

ClientOptions

at line 260
bool usesLowMemoryResourcePool()

Return Value

bool