LockContext
in package
FinalYes
Value object describing the context in which a lock is requested or evaluated.
A lock context identifies the affected node together with the lock owner type and owner identifier, so lock-aware operations can be matched against existing locks.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- __toString() : string
- Returns a human-readable representation for logging and debugging.
- getNode() : Node
- getOwner() : string
- Returns the owner identifier for the current lock type.
- getType() : ILock::TYPE_*
- Returns the lock owner type.
Properties
$node read-only
private
Node
$node
$owner read-only
private
string
$owner
$type read-only
private
int
$type
Methods
__construct()
public
__construct(Node $node, ILock::TYPE_* $type, string $owner) : mixed
Parameters
- $node : Node
-
Node the lock context applies to
- $type : ILock::TYPE_*
-
Lock owner type
- $owner : string
-
Owner identifier for the given type - e.g. a user id, app id, or lock token
Tags
__toString()
Returns a human-readable representation for logging and debugging.
public
__toString() : string
Not guaranteed to be a stable machine-readable contract.
Tags
Return values
stringgetNode()
public
getNode() : Node
Tags
Return values
NodegetOwner()
Returns the owner identifier for the current lock type.
public
getOwner() : string
For example, this may be a user id, app id, or lock token.
Tags
Return values
stringgetType()
Returns the lock owner type.
public
getType() : ILock::TYPE_*