PHP Class Fenos\Notifynder\Handler\NotifynderHandler

Afficher le fichier Open project: fenos/notifynder

Méthodes publiques

Méthode Description
handle ( Fenos\Notifynder\Contracts\NotifyListener $eventListener, null $notifynder = null ) : mixed Handle the event.

Méthodes protégées

Méthode Description
getEventName ( $event ) : string Get Event Name from the key it use a convention.
getNotifynder ( ) : Fenos\Notifynder\Notifynder Get Notifynder Instance.
hasNotificationToSend ( $notificationsResult ) : boolean Check if the fired method has some notifications to send.
listenerIsRegistered ( $eventName ) : boolean Check if the listener exists on the class adding when as convention.

Method Details

getEventName() protected méthode

given user.post.add -> postAdd given user@postAdd -> postAdd
protected getEventName ( $event ) : string
$event
Résultat string

getNotifynder() protected méthode

Get Notifynder Instance.
protected getNotifynder ( ) : Fenos\Notifynder\Notifynder
Résultat Fenos\Notifynder\Notifynder

handle() public méthode

Handle the event.
public handle ( Fenos\Notifynder\Contracts\NotifyListener $eventListener, null $notifynder = null ) : mixed
$eventListener Fenos\Notifynder\Contracts\NotifyListener
$notifynder null
Résultat mixed

hasNotificationToSend() protected méthode

Check if the fired method has some notifications to send.
protected hasNotificationToSend ( $notificationsResult ) : boolean
$notificationsResult
Résultat boolean

listenerIsRegistered() protected méthode

['postAdd'] whenPostAdd]
protected listenerIsRegistered ( $eventName ) : boolean
$eventName
Résultat boolean