PHP Class Bluz\EventManager\EventManager

Afficher le fichier Open project: bluzphp/framework Class Usage Examples

Protected Properties

Свойство Type Description
$listeners list of listeners

Méthodes publiques

Méthode Description
attach ( string $eventName, callable $callback, integer $priority = 1 ) : EventManager Attach callback to event
trigger ( string $event, string | object $target = null, array | object $params = null ) : string | object Trigger event

Méthodes protégées

Méthode Description
fire ( array $listeners, Event $event ) : EventManager Fire!

Method Details

attach() public méthode

Attach callback to event
public attach ( string $eventName, callable $callback, integer $priority = 1 ) : EventManager
$eventName string
$callback callable
$priority integer
Résultat EventManager

fire() protected méthode

Fire!
protected fire ( array $listeners, Event $event ) : EventManager
$listeners array
$event Event
Résultat EventManager

trigger() public méthode

Trigger event
public trigger ( string $event, string | object $target = null, array | object $params = null ) : string | object
$event string
$target string | object
$params array | object
Résultat string | object

Property Details

$listeners protected_oe property

list of listeners
protected $listeners