@@ 21-67 (lines=47) @@ | ||
18 | * @author Beñat Espiña <[email protected]> |
|
19 | * @author Gorka Laucirica <[email protected]> |
|
20 | */ |
|
21 | class FileOverwritten implements FileEvent |
|
22 | { |
|
23 | /** |
|
24 | * The file id. |
|
25 | * |
|
26 | * @var FileId |
|
27 | */ |
|
28 | private $id; |
|
29 | ||
30 | /** |
|
31 | * The occurred on. |
|
32 | * |
|
33 | * @var \DateTimeImmutable |
|
34 | */ |
|
35 | private $occurredOn; |
|
36 | ||
37 | /** |
|
38 | * Constructor. |
|
39 | * |
|
40 | * @param FileId $aFileId The file id |
|
41 | */ |
|
42 | public function __construct(FileId $aFileId) |
|
43 | { |
|
44 | $this->id = $aFileId; |
|
45 | $this->occurredOn = new \DateTimeImmutable(); |
|
46 | } |
|
47 | ||
48 | /** |
|
49 | * Gets the file id. |
|
50 | * |
|
51 | * @return FileId |
|
52 | */ |
|
53 | public function id() |
|
54 | { |
|
55 | return $this->id; |
|
56 | } |
|
57 | ||
58 | /** |
|
59 | * Gets the occurred on. |
|
60 | * |
|
61 | * @return \DateTimeImmutable |
|
62 | */ |
|
63 | public function occurredOn() |
|
64 | { |
|
65 | return $this->occurredOn; |
|
66 | } |
|
67 | } |
|
68 |
@@ 21-67 (lines=47) @@ | ||
18 | * @author Beñat Espiña <[email protected]> |
|
19 | * @author Gorka Laucirica <[email protected]> |
|
20 | */ |
|
21 | class FileRemoved implements FileEvent |
|
22 | { |
|
23 | /** |
|
24 | * The file id. |
|
25 | * |
|
26 | * @var FileId |
|
27 | */ |
|
28 | private $id; |
|
29 | ||
30 | /** |
|
31 | * The occurred on. |
|
32 | * |
|
33 | * @var \DateTimeImmutable |
|
34 | */ |
|
35 | private $occurredOn; |
|
36 | ||
37 | /** |
|
38 | * Constructor. |
|
39 | * |
|
40 | * @param FileId $aFileId The file id |
|
41 | */ |
|
42 | public function __construct(FileId $aFileId) |
|
43 | { |
|
44 | $this->id = $aFileId; |
|
45 | $this->occurredOn = new \DateTimeImmutable(); |
|
46 | } |
|
47 | ||
48 | /** |
|
49 | * Gets the file id. |
|
50 | * |
|
51 | * @return FileId |
|
52 | */ |
|
53 | public function id() |
|
54 | { |
|
55 | return $this->id; |
|
56 | } |
|
57 | ||
58 | /** |
|
59 | * Gets the occurred on. |
|
60 | * |
|
61 | * @return \DateTimeImmutable |
|
62 | */ |
|
63 | public function occurredOn() |
|
64 | { |
|
65 | return $this->occurredOn; |
|
66 | } |
|
67 | } |
|
68 |
@@ 21-67 (lines=47) @@ | ||
18 | * @author Beñat Espiña <[email protected]> |
|
19 | * @author Gorka Laucirica <[email protected]> |
|
20 | */ |
|
21 | class FileUploaded implements FileEvent |
|
22 | { |
|
23 | /** |
|
24 | * The file id. |
|
25 | * |
|
26 | * @var FileId |
|
27 | */ |
|
28 | private $id; |
|
29 | ||
30 | /** |
|
31 | * The occurred on. |
|
32 | * |
|
33 | * @var \DateTimeImmutable |
|
34 | */ |
|
35 | private $occurredOn; |
|
36 | ||
37 | /** |
|
38 | * Constructor. |
|
39 | * |
|
40 | * @param FileId $aFileId The file id |
|
41 | */ |
|
42 | public function __construct(FileId $aFileId) |
|
43 | { |
|
44 | $this->id = $aFileId; |
|
45 | $this->occurredOn = new \DateTimeImmutable(); |
|
46 | } |
|
47 | ||
48 | /** |
|
49 | * Gets the file id. |
|
50 | * |
|
51 | * @return FileId |
|
52 | */ |
|
53 | public function id() |
|
54 | { |
|
55 | return $this->id; |
|
56 | } |
|
57 | ||
58 | /** |
|
59 | * Gets the occurred on. |
|
60 | * |
|
61 | * @return \DateTimeImmutable |
|
62 | */ |
|
63 | public function occurredOn() |
|
64 | { |
|
65 | return $this->occurredOn; |
|
66 | } |
|
67 | } |
|
68 |
@@ 20-66 (lines=47) @@ | ||
17 | * |
|
18 | * @author Beñat Espiña <[email protected]> |
|
19 | */ |
|
20 | class FileRenamed implements FileEvent |
|
21 | { |
|
22 | /** |
|
23 | * The file id. |
|
24 | * |
|
25 | * @var FileId |
|
26 | */ |
|
27 | private $id; |
|
28 | ||
29 | /** |
|
30 | * The occurred on. |
|
31 | * |
|
32 | * @var \DateTimeImmutable |
|
33 | */ |
|
34 | private $occurredOn; |
|
35 | ||
36 | /** |
|
37 | * Constructor. |
|
38 | * |
|
39 | * @param FileId $aFileId The file id |
|
40 | */ |
|
41 | public function __construct(FileId $aFileId) |
|
42 | { |
|
43 | $this->id = $aFileId; |
|
44 | $this->occurredOn = new \DateTimeImmutable(); |
|
45 | } |
|
46 | ||
47 | /** |
|
48 | * Gets the file id. |
|
49 | * |
|
50 | * @return FileId |
|
51 | */ |
|
52 | public function id() |
|
53 | { |
|
54 | return $this->id; |
|
55 | } |
|
56 | ||
57 | /** |
|
58 | * Gets the occurred on. |
|
59 | * |
|
60 | * @return \DateTimeImmutable |
|
61 | */ |
|
62 | public function occurredOn() |
|
63 | { |
|
64 | return $this->occurredOn; |
|
65 | } |
|
66 | } |
|
67 |