CmsLock
in package
implements
ArrayAccess
FinalYes
A simple class represeinting a lock on a logical object in CMSMS.
Tags
Table of Contents
Interfaces
- ArrayAccess
Methods
- __construct() : mixed
- Constructor
- delete() : void
- Delete the current lock from the database.
- expired() : bool
- Test if the current lock object has expired
- load() : CmsLock
- Load a lock based on type and object id.
- load_by_id() : CmsLock
- Create a lock object given it's id, type, and object id
- save() : void
- Save the current lock object
Methods
__construct()
Constructor
public
__construct(string $type, int $oid[, int $lifetime = null ]) : mixed
Parameters
- $type : string
- $oid : int
-
Object Id
- $lifetime : int = null
-
(in minutes) The lifetime of the lock before it can be stolen. If not specified, the system default value will be used.
Tags
delete()
Delete the current lock from the database.
public
delete() : void
Tags
expired()
Test if the current lock object has expired
public
expired() : bool
Return values
boolload()
Load a lock based on type and object id.
public
static & load(string $type, int $oid[, int $uid = null ]) : CmsLock
Parameters
- $type : string
-
The lock type (type of object being locked)
- $oid : int
-
The object id
- $uid : int = null
-
An optional user identifier.
Tags
Return values
CmsLockload_by_id()
Create a lock object given it's id, type, and object id
public
static & load_by_id(int $lock_id, string $type, int $oid[, int $uid = NULL ]) : CmsLock
Parameters
- $lock_id : int
- $type : string
-
The lock type (type of object being locked)
- $oid : int
-
The object id
- $uid : int = NULL
-
An optional user identifier.
Tags
Return values
CmsLocksave()
Save the current lock object
public
save() : void