Lock represents a lock on an object.
- Author
- ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m
Definition at line 18 of file Lock.php.
__construct |
( |
|
$type, |
|
|
|
$oid, |
|
|
|
$login, |
|
|
|
$created = '' |
|
) |
| |
Creates a lock on a given object.
- Parameters
-
$type | One of the Lock::Type constants |
$oid | ObjectId of the object to lock |
$login | Login name of the user who holds the lock |
$created | Creation date of the lock. If omitted the current date will be taken. |
Definition at line 35 of file Lock.php.
Get the type of the lock.
- Returns
- One of the Lock::Type constants.
Definition at line 51 of file Lock.php.
Get the oid of the locked object.
- Returns
- ObjectId of the locked object.
Definition at line 59 of file Lock.php.
Get the login of the user who holds the lock.
- Returns
- The login of the user.
Definition at line 67 of file Lock.php.
Get the creation date/time of the lock.
- Returns
- The creation date/time of the lock.
Definition at line 75 of file Lock.php.
setCurrentState |
( |
|
$currentState | ) |
|
Set the original state of the object in case of an optimistic lock.
- Parameters
-
Definition at line 84 of file Lock.php.
Get the original state of the object in case of an optimistic lock.
- Returns
- PersistentObject instance or null
Definition at line 93 of file Lock.php.
const TYPE_OPTIMISTIC = 'optimistic' |
const TYPE_PESSIMISTIC = 'pessimistic' |