ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
class.ilWebDAVLockObject.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
29 {
30  public function __construct(
31  protected string $token,
32  protected int $obj_id,
33  protected int $ilias_owner,
34  protected string $dav_owner,
35  protected int $expires,
36  protected int $depth,
37  protected string $type,
38  protected int $scope
39  ) {
40  }
41 
42  public function getToken(): string
43  {
44  return $this->token;
45  }
46 
47  public function getObjId(): int
48  {
49  return $this->obj_id;
50  }
51 
52  public function getIliasOwner(): int
53  {
54  return $this->ilias_owner;
55  }
56 
57  public function getDavOwner(): string
58  {
59  return $this->dav_owner;
60  }
61 
62  public function getExpires(): int
63  {
64  return $this->expires;
65  }
66 
67  public function getDepth(): int
68  {
69  return $this->depth;
70  }
71 
72  public function getType(): string
73  {
74  return $this->type;
75  }
76 
77  public function getScope(): int
78  {
79  return $this->scope;
80  }
81 
82  public function getAsSabreDavLock(string $uri): LockInfo
83  {
84  $timestamp = time();
85 
86  $sabre_lock = new LockInfo();
87  $sabre_lock->created = $timestamp;
88  $sabre_lock->depth = $this->depth;
89  $sabre_lock->owner = $this->dav_owner;
90  $sabre_lock->scope = $this->scope;
91  $sabre_lock->timeout = $this->expires - $timestamp;
92  $sabre_lock->created = $this->expires - 3600;
93  $sabre_lock->token = $this->token;
94  $sabre_lock->uri = $uri;
95 
96  return $sabre_lock;
97  }
98 }
$scope
Definition: ltiregstart.php:47
$token
Definition: xapitoken.php:70
__construct(protected string $token, protected int $obj_id, protected int $ilias_owner, protected string $dav_owner, protected int $expires, protected int $depth, protected string $type, protected int $scope)
foreach($mandatory_scripts as $file) $timestamp
Definition: buildRTE.php:70