Download the PHP package jzh/lock without Composer
On this page you can find all versions of the php package jzh/lock. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package lock
webman-lock/symfony-lock
symfony/lock for webman
介绍
在 webman 中简化使用业务锁功能
解决以下问题:
- 并发业务操作有时候需要锁来防止并发导致的数据插入或更新问题
- 单独使用
symfony/lock
时一般使用$factory->createLock('key')
,此时 key 是一个字符串,不利于后期维护或多处使用
安装
使用
方案1
定义一个自己的 Locker 类,比如:mine\facade\Locker.php
,继承 Jzh\Lock\Locker
然后在类上方加入注释(用于代码提示),举例如下:
方案2
直接使用Locker类,举例如下:
更多操作参考:symfony/lock 文档
All versions of lock with dependencies
PHP Build Version
Package Version
The package jzh/lock contains the following files
Loading the files please wait ....