| 1 | <?php |
||
| 5 | class Lock |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var string |
||
| 9 | */ |
||
| 10 | protected $name; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | protected $identity; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var \DateTime |
||
| 19 | */ |
||
| 20 | protected $acquired; |
||
| 21 | |||
| 22 | public function __construct(string $name, string $identity = null, \DateTime $acquired = null) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | public function getName(): string |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | public function getIdentity(): string |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return \DateTime |
||
| 47 | */ |
||
| 48 | public function getAcquired(): \DateTime |
||
| 52 | |||
| 53 | public function getPayload() |
||
| 61 | |||
| 62 | public static function fromPayload(string $payload) |
||
| 72 | } |
||
| 73 |