| 1 |
<?php |
| 2 |
|
| 3 |
namespace FluentCart\App\Events; |
| 4 |
|
| 5 |
|
| 6 |
class UserCreated extends EventDispatcher |
| 7 |
{ |
| 8 |
public string $hook = 'fluent_cart/user_created'; |
| 9 |
protected array $listeners = [ |
| 10 |
|
| 11 |
]; |
| 12 |
|
| 13 |
public $user; |
| 14 |
|
| 15 |
public $userId; |
| 16 |
|
| 17 |
public $password; |
| 18 |
|
| 19 |
|
| 20 |
public function __construct($user, $userId, $password) |
| 21 |
{ |
| 22 |
$this->user = $user; |
| 23 |
$this->userId = $userId; |
| 24 |
$this->password = $password; |
| 25 |
} |
| 26 |
|
| 27 |
public function toArray(): array |
| 28 |
{ |
| 29 |
return [ |
| 30 |
'user' => $this->user, |
| 31 |
'userId' => $this->userId, |
| 32 |
'password' => $this->password |
| 33 |
]; |
| 34 |
} |
| 35 |
|
| 36 |
public function getActivityEventModel() |
| 37 |
{ |
| 38 |
return $this->user; |
| 39 |
} |
| 40 |
|
| 41 |
} |
| 42 |
|