php-extended/php-scorekeeper-object

A library that implements the php-scorekeeper-interface library

7.0.6 2024-07-31 13:34 UTC

README

A scorekeeper decorator that forwards the calls to a simple cache calls.

coverage build status

Installation

The installation of this library is made via composer and the autoloading of all classes of this library is made through their autoloader.

  • Download composer.phar from their website.
  • Then run the following command to install this library as dependency :
  • php composer.phar php-extended/php-scorekeeper-object ^7

Basic Usage

This library may be used the following way :


use PhpExtended\Scorekeeper\ScorekeeperCache;

/* @var $cache \Psr\Cache\CacheItemPoolInterface */

$scorekeeper = new ScorekeeperCache($cache);


use PhpExtended\Scorekeeper\ScorekeeperSimpleCache;

/* @var $cache \Psr\SimpleCache\CacheInterface */

$scorekeeper = new ScorekeeperSimpleCache($cache);


use PhpExtended\Scorekeeper\ScorekeeperLogger;

/* @var $oldKeeper \PhpExtended\Scorekeeper\ScorekeeperInterface */
/* @var $logger \Psr\Log\LoggerInterface */

$scorekeeper = new ScorekeeperLogger($oldKeeper, $logger);

License

MIT (See license file).