1<?php
2
3declare(strict_types=1);
4
5namespace Sabre\DAV\Locks;
6
7/**
8 * LockInfo class.
9 *
10 * An object of the LockInfo class holds all the information relevant to a
11 * single lock.
12 *
13 * @copyright Copyright (C) fruux GmbH (https://fruux.com/)
14 * @author Evert Pot (http://evertpot.com/)
15 * @license http://sabre.io/license/ Modified BSD License
16 */
17class LockInfo
18{
19    /**
20     * A shared lock.
21     */
22    const SHARED = 1;
23
24    /**
25     * An exclusive lock.
26     */
27    const EXCLUSIVE = 2;
28
29    /**
30     * A never expiring timeout.
31     */
32    const TIMEOUT_INFINITE = -1;
33
34    /**
35     * The owner of the lock.
36     *
37     * @var string
38     */
39    public $owner;
40
41    /**
42     * The locktoken.
43     *
44     * @var string
45     */
46    public $token;
47
48    /**
49     * How long till the lock is expiring.
50     *
51     * @var int
52     */
53    public $timeout;
54
55    /**
56     * UNIX Timestamp of when this lock was created.
57     *
58     * @var int
59     */
60    public $created;
61
62    /**
63     * Exclusive or shared lock.
64     *
65     * @var int
66     */
67    public $scope = self::EXCLUSIVE;
68
69    /**
70     * Depth of lock, can be 0 or Sabre\DAV\Server::DEPTH_INFINITY.
71     */
72    public $depth = 0;
73
74    /**
75     * The uri this lock locks.
76     *
77     * TODO: This value is not always set
78     *
79     * @var mixed
80     */
81    public $uri;
82}
83