protected function fireEvent(string $event, $entity, bool $halt = false)
    {
        $event = "mongolid.{$event}: ".get_class($entity);

        $this->eventService ? $this->eventService : $this->eventService = Ioc::make(EventTriggerService::class);

        return $this->eventService->fire($event, $entity, $halt);
    }
protected function fireEvent(string $event, $entity, bool $halt = false)
    {
        $event = "mongolid.{$event}: ".get_class($entity);

        $this->eventService ? $this->eventService : $this->eventService = Ioc::make(EventTriggerService::class);

        return $this->eventService->fire($event, $entity, $halt);
    }
protected function fireEvent ( string $ event , $ entity , bool $ halt = false ) { $ event = "mongolid.{$event}: " . get_class ( $ entity ) ; $ this -> eventService ? $ this -> eventService : $ this -> eventService = Ioc :: make ( EventTriggerService :: class ) ; return $ this -> eventService -> fire ( $ event , $ entity , $ halt ) ; }
Triggers an event. May return if that event had success.

@param string $event  identification of the event
@param mixed  $entity event payload
@param bool   $halt   true if the return of the event handler will be used in a conditional

@return mixed event handler return
Triggers an event . May return if that event had success .