You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 26, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+3-8Lines changed: 3 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,24 +114,19 @@ The only `LockFactory` available at the moment is the `TH\Lock\FileFactory`. Thi
114
114
use TH\Lock\FileFactory;
115
115
116
116
$factory = new FileFactory('/path/to/lock_dir/');
117
-
$factory->setLogger($psrLogger);
118
-
119
-
$factory->create(...);
117
+
$lock = $factory->create('resource identifier');
120
118
```
121
119
122
120
## API
123
121
124
-
There are three methods you can use on a `FileLock`:
122
+
There are two methods you can use on a `FileLock`:
125
123
126
124
*`\TH\Lock\FileLock::acquire($exclusive = FileLock::EXCLUSIVE, $blocking = FileLock::NON_BLOCKING)` used to acquire a lock on the file
127
125
*`\TH\Lock\FileLock::release()` used to release a lock on the file
128
-
*`\TH\Lock\FileLock::setLogger(\Psr\Log\LoggerInterface $logger)` used to configure this lock logger (configured by the factory if the `LockFile` come from the factory)
129
126
130
-
And two on `FileFactory':
127
+
And one on a `FileFactory':
131
128
132
129
*`\TH\Lock\FileFactory::create($resource, $owner = null)` used to create a `FileLock` for $resource
133
-
*`\TH\Lock\FileFactory::setLogger(\Psr\Log\LoggerInterface $logger)` used to configure lock build by this factory
0 commit comments