ILIAS  release_8 Revision v8.24
class.ilWebDAVLockObject.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
21use Sabre\DAV\Locks\LockInfo;
22
29{
30 protected string $token;
31 protected int $obj_id;
32 protected int $ilias_owner;
33 protected string $dav_owner;
34 protected int $expires;
35 protected int $depth;
36 protected string $type;
37 protected int $scope;
38
39 public function __construct(
40 string $token,
41 int $obj_id,
42 int $ilias_owner,
43 string $dav_owner,
44 int $expires,
45 int $depth,
46 string $type,
47 int $scope
48 ) {
49 $this->token = $token;
50 $this->obj_id = $obj_id;
51 $this->ilias_owner = $ilias_owner;
52 $this->dav_owner = $dav_owner;
53 $this->expires = $expires;
54 $this->depth = $depth;
55 $this->type = $type;
56 $this->scope = $scope;
57 }
58
59 public function getToken(): string
60 {
61 return $this->token;
62 }
63
64 public function getObjId(): int
65 {
66 return $this->obj_id;
67 }
68
69 public function getIliasOwner(): int
70 {
71 return $this->ilias_owner;
72 }
73
74 public function getDavOwner(): string
75 {
76 return $this->dav_owner;
77 }
78
79 public function getExpires(): int
80 {
81 return $this->expires;
82 }
83
84 public function getDepth(): int
85 {
86 return $this->depth;
87 }
88
89 public function getType(): string
90 {
91 return $this->type;
92 }
93
94 public function getScope(): int
95 {
96 return $this->scope;
97 }
98
99 public function getAsSabreDavLock(string $uri): LockInfo
100 {
101 $timestamp = time();
102
103 $sabre_lock = new LockInfo();
104 $sabre_lock->created = $timestamp;
105 $sabre_lock->depth = $this->depth;
106 $sabre_lock->owner = $this->dav_owner;
107 $sabre_lock->scope = $this->scope;
108 $sabre_lock->timeout = $this->expires - $timestamp;
109 $sabre_lock->created = $this->expires - 3600;
110 $sabre_lock->token = $this->token;
111 $sabre_lock->uri = $uri;
112
113 return $sabre_lock;
114 }
115}
foreach($mandatory_scripts as $file) $timestamp
Definition: buildRTE.php:70
__construct(string $token, int $obj_id, int $ilias_owner, string $dav_owner, int $expires, int $depth, string $type, int $scope)