| 1 | <?php |
||
| 8 | class Event implements EventInterface { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @var string |
||
| 12 | */ |
||
| 13 | protected $name; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var EntityInterface |
||
| 17 | */ |
||
| 18 | protected $entity; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var array |
||
| 22 | */ |
||
| 23 | protected $data = []; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Event constructor. |
||
| 27 | * @param string $name |
||
| 28 | * @param EntityInterface $entity |
||
| 29 | * @param array $data |
||
| 30 | */ |
||
| 31 | public function __construct($name, EntityInterface $entity, array $data = []) { |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | public function getName() |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return EntityInterface |
||
| 47 | */ |
||
| 48 | public function getEntity() |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return array |
||
| 55 | */ |
||
| 56 | public function getData() |
||
| 60 | } |
||
| 61 |