Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame^] | 1 | <?php |
| 2 | |
| 3 | namespace LdapRecord\Models\Events; |
| 4 | |
| 5 | use LdapRecord\Models\Model; |
| 6 | |
| 7 | abstract class Event |
| 8 | { |
| 9 | /** |
| 10 | * The model that the event is being triggered on. |
| 11 | * |
| 12 | * @var Model |
| 13 | */ |
| 14 | protected $model; |
| 15 | |
| 16 | /** |
| 17 | * Constructor. |
| 18 | * |
| 19 | * @param Model $model |
| 20 | */ |
| 21 | public function __construct(Model $model) |
| 22 | { |
| 23 | $this->model = $model; |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * Returns the model that generated the event. |
| 28 | * |
| 29 | * @return Model |
| 30 | */ |
| 31 | public function getModel() |
| 32 | { |
| 33 | return $this->model; |
| 34 | } |
| 35 | } |