Nextcloud PHP API (master)

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
since
24.0.0

Table of Contents

Properties

$node  : Node
$owner  : string
$type  : int

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

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
since
24.0.0

__toString()

Returns a human-readable representation for logging and debugging.

public __toString() : string

Not guaranteed to be a stable machine-readable contract.

Tags
since
24.0.0
Return values
string

getOwner()

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
since
24.0.0
Return values
string

getType()

Returns the lock owner type.

public getType() : ILock::TYPE_*
Tags
since
24.0.0
Return values
ILock::TYPE_*
On this page

Search results