18 class Lock implements \Serializable {
24 private $objectId =
null;
26 private $created =
"";
27 private $currentState =
null;
36 public function __construct($type, $oid, $login, $created=
'') {
38 $this->objectId = $oid;
39 $this->login = $login;
41 $this->created = date(
"Y-m-d H:i:s");
44 $this->created = $created;
61 return $this->objectId;
77 return $this->created;
86 $this->currentState =
serialize($currentState);
100 $this->login, $this->created,
serialize($this->currentState)]);
105 $this->type = $parts[0];
107 $this->login = $parts[2];
108 $this->created = $parts[3];
getCreated()
Get the creation date/time of the lock.
getLogin()
Get the login of the user who holds the lock.
getObjectId()
Get the oid of the locked object.
Lock represents a lock on an object.
__construct($type, $oid, $login, $created='')
Creates a lock on a given object.
setCurrentState($currentState)
Set the original state of the object in case of an optimistic lock.
getCurrentState()
Get the original state of the object in case of an optimistic lock.
getType()
Get the type of the lock.