sbooker / persistent-pointer
Installs: 4 434
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^7.4 || ^8.0
Requires (Dev)
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2024-11-13 13:42:48 UTC
README
Installation
Install via Composer:
composer require sbooker/persistent-pointer
Usage
<?php use Sbooker\PersistentPointer\Pointer; use Sbooker\PersistentPointer\Repository; use Sbooker\PersistentPointer\PointerStorage; $pointer = new Pointer('name'); $pointer->getValue(); // returns 0 // Increase pointer $pointer->increaseTo(2); $pointer->getValue(); // returns 2 // Decrease pointer $pointer->increaseTo(1); // throws \InvalidArgumentException
License
See LICENSE file.