php-extended/php-scorekeeper-object

A library that implements the php-scorekeeper-interface library

4.0.0 2022-05-31 07:48 UTC

This package is auto-updated.

Last update: 2022-07-31 00:31:43 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. Download composer.phar from their website. Then add to your composer.json :

	"require": {
		...
		"php-extended/php-scorekeeper-object": "^3"
		...
	}

Then run php composer.phar update to install this library. The autoloading of all classes of this library is made through composer's autoloader.

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