aboutcoders / resource-lock-bundle
Simple resource locking
Installs: 21 745
Dependents: 1
Suggesters: 0
Security: 0
Stars: 4
Watchers: 3
Forks: 2
Open Issues: 0
Type:symfony-bundle
Requires
- gedmo/doctrine-extensions: ~2.0
- sensio/framework-extra-bundle: ~3.0
- symfony/symfony: ~2.6|~3.0
Requires (Dev)
- doctrine/doctrine-bundle: ~1.2
- doctrine/orm: ~2.2,>=2.2.3
- phpunit/phpunit: ~4
- symfony/monolog-bundle: ~2
This package is not auto-updated.
Last update: 2024-12-21 07:20:07 UTC
README
A Symfony bundle that provides resource lock implementation
Installation
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; }
Configuration
Configure the bundle
# app/config/config.yml abc_resource_lock: db_driver: orm
You 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_prefix
Usage
Use 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');
License
The MIT License (MIT). Please see License File for more information.