green-links/psr-16-adapter

This package is abandoned and no longer maintained. No replacement package was suggested.

An adapter to convert PSR-6 caches into PSR-16 caches.

dev-main 2021-01-20 19:22 UTC

This package is auto-updated.

Last update: 2022-12-17 19:41:08 UTC


README

Standalone adapter for making a PSR-6 cache behave like a PSR-16 cache.

Usage

The adapter can be called with a PSR-6 or PSR-16 cache object.

$cache = Adapter::create($psr6_or_psr16_cache);

If the adapter is passed a psr-16 cache object, then it returns the same psr-16 cache object.

If the adapter is passed a psr-6 cache object, then it returns an instance of itself wrapping the psr-6 cache object.

If the adapter is passed anything else, then a GreenLinks\Psr16Adapter\Exception\InvalidArgumentException exception is thrown.