| 1 | <?php |
||
| 9 | trait HasEvents |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Register a component event with the dispatcher. |
||
| 13 | * |
||
| 14 | * @param string $event |
||
| 15 | * @param \Closure|string $callback |
||
| 16 | * @return void |
||
| 17 | */ |
||
| 18 | protected static function registerEvent($event, $callback) |
||
| 26 | |||
| 27 | protected function fireEvent($event, $halt = true) |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Get the event dispatcher instance. |
||
| 41 | * |
||
| 42 | * @return \Illuminate\Contracts\Events\Dispatcher |
||
| 43 | */ |
||
| 44 | public static function getEventDispatcher() |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Set the event dispatcher instance. |
||
| 51 | * |
||
| 52 | * @param \Illuminate\Contracts\Events\Dispatcher $dispatcher |
||
| 53 | * @return void |
||
| 54 | */ |
||
| 55 | public static function setEventDispatcher(Dispatcher $dispatcher) |
||
| 59 | } |
||
| 60 |