Skip to content

[READONLY] This is the events module of the Elephox framework.

License

Notifications You must be signed in to change notification settings

elephox-dev/events

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elephox Events Module

This module is used by Elephox to provide an event bus with broadcasters and listeners.

Example

<?php

use Elephox\Events\EventBus;

$bus = new EventBus();
$subscription = $bus->subscribe('test', function ($data) {
    echo 'test event: ' . $data;
});

$bus->publish('test', 'test data'); // "test event: test data"

$bus->unsubscribe($subscription);

$bus->publish('test', 'test data'); // no output

About

[READONLY] This is the events module of the Elephox framework.

Resources

License

Stars

Watchers

Forks

Languages