aboutcoders/resource-lock-bundle
最新稳定版本:0.2.0
Composer 安装命令:
composer require aboutcoders/resource-lock-bundle
包简介
Simple resource locking
关键字:
README 文档
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.
统计信息
- 总下载量: 23.22k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-04-04