19 declare(strict_types=1);
    35         $select_query = 
"SELECT SELECT EXISTS(SELECT 1 FROM $this->lock_table WHERE token = " .
    36             $this->db->quote($token, 
'text') . 
") AS count";
    37         $select_result = $this->db->query($select_query);
    38         $select_result->numRows();
    39         $row = $this->db->fetchAssoc($select_result);
    45         $query = 
"SELECT obj_id, ilias_owner, dav_owner, expires, depth, type, scope FROM $this->lock_table"    46             . 
" WHERE token = " . $this->db->quote($token, 
'text')
    47             . 
" AND expires > " . $this->db->quote(time(), 
'integer');
    49         $select_result = $this->db->query($query);
    50         $row = $this->db->fetchAssoc($select_result);
    56                 (
int) $row[
'ilias_owner'],
    58                 (
int) $row[
'expires'],
    70         $query = 
"SELECT token, ilias_owner, dav_owner, expires, depth, type, scope FROM $this->lock_table WHERE obj_id = "    71             . $this->db->quote($obj_id, 
'integer')
    72             . 
" AND expires > " . $this->db->quote(time(), 
'integer');
    73         $select_result = $this->db->query($query);
    74         $row = $this->db->fetchAssoc($select_result);
    80                 (
int) $row[
'ilias_owner'],
    82                 (
int) $row[
'expires'],
    94         $this->db->insert($this->lock_table, [
    95             'token' => [
'text', $ilias_lock->
getToken()],
    96             'obj_id' => [
'integer', $ilias_lock->
getObjId()],
    98             'dav_owner' => [
'text', $ilias_lock->
getDavOwner()],
    99             'expires' => [
'integer', $ilias_lock->
getExpires()],
   100             'depth' => [
'integer', $ilias_lock->
getDepth()],
   101             'type' => [
'text', $ilias_lock->
getType()],
   102             'scope' => [
'integer', $ilias_lock->
getScope()]
   108         return $this->db->manipulate(
   109             "DELETE FROM $this->lock_table WHERE token = " . $this->db->quote($token, 
"integer")
   115         return $this->db->manipulate(
   116             "DELETE FROM $this->lock_table WHERE expires < " . $this->db->quote(time(), 
'integer')
   122         return $this->db->update(
   124             [
"obj_id" => [
"integer", $new_obj_id]],
   125             [
"obj_id" => [
"integer", $old_obj_id]]
 
checkIfLockExistsInDB(string $token)
 
__construct(protected ilDBInterface $db)
 
purgeExpiredLocksFromDB()
 
getLockObjectWithObjIdFromDB(int $obj_id)
 
getLockObjectWithTokenFromDB(string $token)
 
updateLocks(int $old_obj_id, int $new_obj_id)
 
removeLockWithTokenFromDB(string $token)
 
saveLockToDB(ilWebDAVLockObject $ilias_lock)