PHP Interface Fenos\Notifynder\Contracts\NotifynderDispatcher

Show file Open project: fenos/notifynder Interface Usage Examples

Public Methods

Method Description
boot ( array $listeners ) Boot The listeners.
delegate ( Fenos\Notifynder\Notifynder $notifynder, array $data, array $events ) : mixed Delegate events to categories.
fire ( Fenos\Notifynder\Notifynder $notifynder, string $eventName, string $categoryName = null, mixed | null $values = [] ) : mixed | null It fire the event associated to the passed key, trigger the listener method bound with.
hasNotificationToSend ( $notificationsResult ) : boolean Check if the fired method has some notifications to send.
sendWith ( $customMethod ) Tell the dispatcher to send the notification with a custom (extended method).

Method Details

boot() public method

Boot The listeners.
public boot ( array $listeners )
$listeners array

delegate() public method

Delegate events to categories.
public delegate ( Fenos\Notifynder\Notifynder $notifynder, array $data, array $events ) : mixed
$notifynder Fenos\Notifynder\Notifynder
$data array
$events array
return mixed

fire() public method

It fire the event associated to the passed key, trigger the listener method bound with.
public fire ( Fenos\Notifynder\Notifynder $notifynder, string $eventName, string $categoryName = null, mixed | null $values = [] ) : mixed | null
$notifynder Fenos\Notifynder\Notifynder
$eventName string
$categoryName string
$values mixed | null
return mixed | null

hasNotificationToSend() public method

Check if the fired method has some notifications to send.
public hasNotificationToSend ( $notificationsResult ) : boolean
$notificationsResult
return boolean

sendWith() public method

Tell the dispatcher to send the notification with a custom (extended method).
public sendWith ( $customMethod )
$customMethod