RestrictionManager
FinalYes
Table of Contents
Constants
- DEFAULT_LIMIT = 10
- LOCK_NAME = 'oo_edit_restriction'
- TTL = 4 * 3600
- TTL_PENDING = 2 * 60
- UNLIMITED_VALUE = -1
Methods
- __construct() : mixed
- deleteOldOrPending() : void
- deleteOldOrPendingAgent() : string
- deletePendingUsages() : void
- getLimit() : int
- isAllowedEdit() : bool
- lock() : bool
- processHookData() : void
- registerUsage() : void
- shouldUseRestriction() : bool
- unlock() : void
Constants
DEFAULT_LIMIT
public
mixed
DEFAULT_LIMIT
= 10
LOCK_NAME
public
mixed
LOCK_NAME
= 'oo_edit_restriction'
TTL
public
mixed
TTL
= 4 * 3600
TTL_PENDING
public
mixed
TTL_PENDING
= 2 * 60
UNLIMITED_VALUE
public
mixed
UNLIMITED_VALUE
= -1
Methods
__construct()
public
__construct() : mixed
deleteOldOrPending()
public
static deleteOldOrPending() : void
deleteOldOrPendingAgent()
public
static deleteOldOrPendingAgent() : string
Return values
stringdeletePendingUsages()
public
deletePendingUsages() : void
getLimit()
public
getLimit() : int
Return values
intisAllowedEdit()
public
isAllowedEdit(string $documentKey, int $userId) : bool
Parameters
- $documentKey : string
- $userId : int
Return values
boollock()
public
lock() : bool
Return values
boolprocessHookData()
public
processHookData(int $status, array<string|int, mixed> $hookData) : void
Parameters
- $status : int
- $hookData : array<string|int, mixed>
registerUsage()
public
registerUsage(string $documentKey, int $userId) : void
Parameters
- $documentKey : string
- $userId : int
shouldUseRestriction()
public
shouldUseRestriction() : bool
Return values
boolunlock()
public
unlock() : void