NullLock
in package
implements
LockInterface
Tags
Table of Contents
Interfaces
- LockInterface
- Lock interface.
Properties
- $hasLock : mixed
Methods
- acquire() : bool
- Acquire lock.
- create() : static
- Create lock.
- isAcquired() : bool
- isFree() : bool|null|string
- release() : bool|null|string
- Release lock.
Properties
$hasLock
private
mixed
$hasLock
= FALSE
Methods
acquire()
Acquire lock.
public
acquire([int|null $timeout = NULL ]) : bool
Parameters
- $timeout : int|null = NULL
-
The number of seconds to wait to get the lock. For a default value, use NULL.
Return values
boolcreate()
Create lock.
public
static create(string $name) : static
Parameters
- $name : string
Return values
staticisAcquired()
public
isAcquired() : bool
Return values
boolisFree()
public
isFree() : bool|null|string
Not supported by some locking strategies. If you need to poll, better to use acquire(0).
Return values
bool|null|string —Trueish/falsish.
release()
Release lock.
public
release() : bool|null|string
Return values
bool|null|string —Trueish/falsish.