2017 © Pedro Peláez
 

library event-manager

Event manager based on reflection, annotations and priority queue

image

phpextra/event-manager

Event manager based on reflection, annotations and priority queue

  • Thursday, October 13, 2016
  • by jkobus
  • Repository
  • 2 Watchers
  • 6 Stars
  • 9,300 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 0 Forks
  • 5 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

Event Manager

Latest Stable Version Total Downloads License Build Status Scrutinizer Code Quality Code Coverage, (*1)

How it works ?

Both the event and listener are (marker) interfaces. Events support inheritance., (*2)

Examples

class UserLoginEvent implements Event
{
    public $userId;
}

class UserListener implements Listener
{
    /**
     * Acts on UserLoginEvent or it's descendants
     */
    public function onUserLogin(UserLoginEvent $event)
    {
        echo "User listener 1";
    }

    /**
     * Act on any event
     */
    public function onAnyEvent(Event $event)
    {
        echo "User listener 2";
    }
}

$manager = new EventManager();
$manager->add(new UserListener());
$manager->emit(new UserLoginEvent($user));

Result:, (*3)

> User listener 1
> User listener 2

Installation (Composer)

composer require phpextra/event-manager:5.*

Running tests

composer tests

Running php-cs-fixer

composer fix

Contributing

All code contributions must go through a pull request. Fork the project, create a feature branch, and send me a pull request. To ensure a consistent code base, you should make sure the code follows the coding standards. If you would like to help, take a look at the list of issues., (*4)

Authors

Jacek Kobus - kobus.jacek@gmail.com, (*5)

The Versions

13/10 2016

dev-exception-handling

dev-exception-handling https://github.com/phpextra/event-manager

Event manager based on reflection, annotations and priority queue

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jacek Kobus

psr event listener psr-0 observer event manager phpextra

25/03 2016

dev-master

9999999-dev https://github.com/phpextra/event-manager

Event manager based on reflection, annotations and priority queue

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jacek Kobus

psr event listener psr-0 observer event manager phpextra

25/03 2016

4.0.0

4.0.0.0 https://github.com/phpextra/event-manager

Event manager based on reflection, annotations and priority queue

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jacek Kobus

psr event listener psr-0 observer event manager phpextra

20/05 2015

3.0.0

3.0.0.0 https://github.com/phpextra/event-manager

Event manager based on reflection, annotations and priority queue

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jacek Kobus

event listener psr-0 observer event manager

14/05 2015

2.1.1

2.1.1.0 https://github.com/phpextra/event-manager

Event manager based on reflection, annotations and priority queue

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jacek Kobus

event listener psr-0 observer event manager

14/05 2015

2.1.0

2.1.0.0 https://github.com/phpextra/event-manager

Event manager based on reflection, annotations and priority queue

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jacek Kobus

event listener psr-0 observer event manager

20/11 2014

2.0.0

2.0.0.0 https://github.com/phpextra/event-manager

Event manager based on reflection, annotations and priority queue

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jacek Kobus

event listener psr-0 observer event manager

24/10 2014

1.0.2

1.0.2.0 https://github.com/phpextra/event-manager

Event manager based on reflection, annotations and priority queue

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jacek Kobus

event listener psr-0 observer event manager

25/09 2014

1.0.1

1.0.1.0 https://github.com/phpextra/event-manager

Event manager based on reflection, annotations and priority queue

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jacek Kobus

event listener psr-0 observer event manager

26/03 2014

1.0.0

1.0.0.0 https://github.com/phpextra/event-manager

Event manager based on reflection, annotations and priority queue

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jacek Kobus

event listener psr-0 observer event manager