A Symfony bundle that provides resource lock implementation
Add the AbcResourceLockBundle to your composer.json file
{
"require": {
"aboutcoders/resource-lock-bundle": "dev-master"
}
}Include the bundle in the AppKernel.php class
public function registerBundles()
{
$bundles = array(
// ...
new Abc\Bundle\ResourceLockBundle\AbcResourceLockBundle(),
);
return $bundles;
}Configure the bundle
# app/config/config.yml
abc_resource_lock:
db_driver: ormYou can define custom managers with a custom prefix within the managers section
# app/config/config.yml
abc_resource_lock:
db_driver: orm
managers:
my_manager:
prefix: my_prefix
another_manager:
prefix: another_prefixUse Lock manager to get, set or check locks:
$container->get('abc.resource_lock.lock_manager');To retrieve the custom manager from the service container you have to specify it by its name:
$container->get('abc.resource_lock.lock_manager_my_manager');The MIT License (MIT). Please see License File for more information.