php-extended/php-scorekeeper-object

A library that implements the php-scorekeeper-interface library

6.0.6 2024-03-25 12:40 UTC

This package is auto-updated.

Last update: 2024-03-25 11:42:53 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 ^6

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).