◆ __construct()
Constructs a new lock object with the provided id.
- Parameters
-
String | $id | Identifier of the lock |
◆ getFilename()
Returns the filename of the lock.
- Returns
- String Filename of the lock
◆ isLocked()
isLocked |
( |
& |
$lock_data = null | ) |
|
Tests whether the lock is in use. Returns lock information in $lock_data.
- Parameters
-
mixed | $lock_data | Information stored in lock |
- Returns
- bool Indicates whether the lock is active or not
◆ lock()
Establish or renew the current lock. Provided lock information will be stored with the lock.
- Parameters
-
Array | $data | Additional information to bestore with the lock |
◆ release()
Releases a previously obtained lock
◆ setDirectory()
static setDirectory |
( |
|
$directory | ) |
|
|
static |
Sets a new base path for the locks.
- Parameters
-
- Exceptions
-
RuntimeException | if provided directory is either not existant or is not a directory or is not writable. |
◆ $directory
◆ $filename
The documentation for this class was generated from the following file: