ferrumfist/locker

There is no license information available for the latest version (1.0.0) of this package.

1.0.0 2022-08-08 12:44 UTC

This package is auto-updated.

Last update: 2024-12-15 18:09:57 UTC


README

PHP library performs resource locking

Installation

composer require ferrumfist/locker

Usage

$store = new FileStore(__DIR__ . '/stores');
$locker = new Locker($store);
$resource = new LockResource('ResourceName');

if($locker->lock($resource)){
    echo "Resource was successfully locked" . PHP_EOL;
} else {
    echo "Resource could not be locked" . PHP_EOL;
}