PHP Class Fenos\Notifynder\Handler\Dispatcher

Inheritance: implements Fenos\Notifynder\Contracts\NotifynderDispatcher
Mostrar archivo Open project: fenos/notifynder

Public Properties

Property Type Description
$defaultWildcard string Default namespace for notifications events.

Protected Properties

Property Type Description
$event Illuminate\Events\Dispatcher
$sender string Default sender method.

Public Methods

Method Description
__construct ( Illuminate\Contracts\Events\Dispatcher $event )
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).

Protected Methods

Method Description
generateEventName ( $eventName ) : string Get Event name.

Method Details

__construct() public method

public __construct ( Illuminate\Contracts\Events\Dispatcher $event )
$event Illuminate\Contracts\Events\Dispatcher

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

generateEventName() protected method

Get Event name.
protected generateEventName ( $eventName ) : string
$eventName
return string

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

Property Details

$defaultWildcard public_oe static_oe property

Default namespace for notifications events.
public static string $defaultWildcard
return string

$event protected_oe property

protected Dispatcher,Illuminate\Events $event
return Illuminate\Events\Dispatcher

$sender protected_oe property

Default sender method.
protected string $sender
return string