LockInfo.php 1.3 KB

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