-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathLogEntryInterface.php
More file actions
106 lines (87 loc) · 2.1 KB
/
LogEntryInterface.php
File metadata and controls
106 lines (87 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php
/*
* This file is part of the Doctrine Behavioral Extensions package.
* (c) Gediminas Morkevicius <gediminas.morkevicius@gmail.com> http://www.gediminasm.org
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Gedmo\Loggable;
/**
* Interface to be implemented by log entry models.
*
* @phpstan-template T of object
*
* @author Javier Spagnoletti <phansys@gmail.com>
*/
interface LogEntryInterface
{
public const ACTION_CREATE = 'create';
public const ACTION_UPDATE = 'update';
public const ACTION_REMOVE = 'remove';
/**
* @phpstan-param self::ACTION_CREATE|self::ACTION_UPDATE|self::ACTION_REMOVE $action
*
* @return void
*/
public function setAction(string $action);
/**
* @return string|null
*
* @phpstan-return self::ACTION_CREATE|self::ACTION_UPDATE|self::ACTION_REMOVE|null
*/
public function getAction();
/**
* @return void
*/
public function setUsername(string $username);
/**
* @return string|null
*/
public function getUsername();
/**
* @phpstan-param class-string<T> $objectClass
*
* @return void
*/
public function setObjectClass(string $objectClass);
/**
* @return string|null
*
* @phpstan-return class-string<T>|null
*/
public function getObjectClass();
/**
* @return void
*/
public function setLoggedAt();
/**
* @return \DateTimeInterface|null
*/
public function getLoggedAt();
/**
* @return void
*/
public function setObjectId(string $objectId);
/**
* @return string|null
*/
public function getObjectId();
/**
* @param array<string, mixed> $data
*
* @return void
*/
public function setData(array $data);
/**
* @return array<string, mixed>|null
*/
public function getData();
/**
* @return void
*/
public function setVersion(int $version);
/**
* @return int|null
*/
public function getVersion();
}