Index Documentation

CacheBackends
in package

FinalYes

Provides a registry of cache backends.

Table of Contents

Methods

__construct()  : mixed
backend()  : CacheBackend
Creates a cache provider information class from a scheme.
create()  : CacheProvider
Creates a cache provider from a DSN URI.
parse()  : CacheProviderInfo
Parses a DSN URI into a provider info class.
register()  : void
Registers a cache backend with a protocol scheme.

Methods

__construct()

public __construct() : mixed
Tags
throws
RuntimeException

Will always throw because this is a static class exclusively.

backend()

Creates a cache provider information class from a scheme.

public static backend(string $scheme) : CacheBackend
Parameters
$scheme : string

Cache protocol scheme.

Tags
throws
InvalidArgumentException

If $scheme is not a registered protocol scheme.

throws
RuntimeException

If the implementation class is not available or doesn't implement CacheBackend.

Return values
CacheBackend

Cache backend information instance.

create()

Creates a cache provider from a DSN URI.

public static create(string $uri) : CacheProvider
Parameters
$uri : string

DSN URI.

Tags
throws
RuntimeException

If the requested cache backend is not available.

Return values
CacheProvider

Connection instance.

register()

Registers a cache backend with a protocol scheme.

public static register(string $scheme, string $className) : void
Parameters
$scheme : string

URL scheme.

$className : string

Fully qualified class name of the backend.

Tags
throws
InvalidArgumentException

If $scheme is already registered.


        
On this page

Search results