CacheBackend
in
Information about a cache provider. Should not have any external dependencies.
Table of Contents
Methods
- createProvider() : CacheProvider
- Creates the cache provider described in the argument.
- isAvailable() : bool
- Checks whether the driver is available and a provider can be made.
- parseDsn() : CacheProviderInfo
- Constructs a cache info instance from a dsn.
Methods
createProvider()
Creates the cache provider described in the argument.
public
createProvider(CacheProviderInfo $providerInfo) : CacheProvider
Parameters
- $providerInfo : CacheProviderInfo
-
Object that describes the desired provider.
Tags
Return values
CacheProvider —The provider described in the provider info.
isAvailable()
Checks whether the driver is available and a provider can be made.
public
isAvailable() : bool
Return values
bool —If true a provider can be made, if false a required extension is missing.
parseDsn()
Constructs a cache info instance from a dsn.
public
parseDsn(string|array<string, string|int> $dsn) : CacheProviderInfo
Parameters
- $dsn : string|array<string, string|int>
-
DSN with provider information.
Return values
CacheProviderInfo —Provider info based on the dsn.