ILock
in
Tags
Table of Contents
Constants
- LOCK_DEPTH_INFINITE = -1
- Lock app resources under the locked one with infinite depth
- LOCK_DEPTH_ZERO = 0
- Lock only the resource the lock is applied to
- LOCK_EXCLUSIVE = 1
- WebDAV Lock scope exclusive
- LOCK_SHARED = 2
- WebDAV Lock scope shared
- TYPE_APP = 1
- App owned lock
- TYPE_TOKEN = 2
- Token owned lock
- TYPE_USER = 0
- User owned manual lock
Methods
- __toString() : string
- String representation of the lock to identify it through logging
- getCreatedAt() : int
- Unix timestamp of the lock creation time
- getDepth() : int
- Lock depth to apply the lock to child resources
- getFileId() : int
- File id that the lock is holding
- getOwner() : string
- Owner that holds the lock
- getScope() : int
- WebDAV lock scope
- getTimeout() : int
- Timeout of the lock in seconds starting from the created at time
- getToken() : string
- Token string as a unique identifier for the lock, usually a UUID
- getType() : int
- Type of the lock
Constants
LOCK_DEPTH_INFINITE
Lock app resources under the locked one with infinite depth
public
mixed
LOCK_DEPTH_INFINITE
= -1
Tags
LOCK_DEPTH_ZERO
Lock only the resource the lock is applied to
public
mixed
LOCK_DEPTH_ZERO
= 0
Tags
LOCK_EXCLUSIVE
WebDAV Lock scope exclusive
public
mixed
LOCK_EXCLUSIVE
= 1
Tags
LOCK_SHARED
WebDAV Lock scope shared
public
mixed
LOCK_SHARED
= 2
Tags
TYPE_APP
App owned lock
public
mixed
TYPE_APP
= 1
This lock type is created by collaborative apps like Text or Office to avoid outside changes through WevDAV or other apps.
Tags
TYPE_TOKEN
Token owned lock
public
mixed
TYPE_TOKEN
= 2
This lock type will bind the ownership to the provided lock token. Any request that aims to modify the file will be required to sent the token, the user itself is not able to write to files without the token. This will allow to limit the locking to an individual client.
Tags
TYPE_USER
User owned manual lock
public
mixed
TYPE_USER
= 0
This lock type is initiated by a user manually through the web UI or clients and will limit editing capabilities on the file to the lock owning user.
Tags
Methods
__toString()
String representation of the lock to identify it through logging
public
__toString() : string
Tags
Return values
stringgetCreatedAt()
Unix timestamp of the lock creation time
public
getCreatedAt() : int
Tags
Return values
intgetDepth()
Lock depth to apply the lock to child resources
public
getDepth() : int
Tags
Return values
intgetFileId()
File id that the lock is holding
public
getFileId() : int
Tags
Return values
intgetOwner()
Owner that holds the lock
public
getOwner() : string
Depending on the lock type this is:
- ILock::TYPE_USER: A user id
- ILock::TYPE_APP: An app id
- ILock::TYPE_TOKEN: A user id
Tags
Return values
stringgetScope()
WebDAV lock scope
public
getScope() : int
Tags
Return values
intgetTimeout()
Timeout of the lock in seconds starting from the created at time
public
getTimeout() : int
Tags
Return values
intgetToken()
Token string as a unique identifier for the lock, usually a UUID
public
getToken() : string
Tags
Return values
stringgetType()
Type of the lock
public
getType() : int