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