-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPostDtoMappingEvent.php
More file actions
37 lines (30 loc) · 890 Bytes
/
PostDtoMappingEvent.php
File metadata and controls
37 lines (30 loc) · 890 Bytes
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
<?php
namespace Artyum\RequestDtoMapperBundle\Event;
use Artyum\RequestDtoMapperBundle\Attribute\Dto;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Contracts\EventDispatcher\Event;
/**
* This event is dispatched once the mapping is done. If the validation is disabled, this would be the last event that is dispatched before your controller is called.
*/
class PostDtoMappingEvent extends Event
{
public function __construct(private Request $request, private Dto $attribute, private object $subject, private array $data)
{
}
public function getRequest(): Request
{
return $this->request;
}
public function getAttribute(): Dto
{
return $this->attribute;
}
public function getSubject(): object
{
return $this->subject;
}
public function getData(): array
{
return $this->data;
}
}