Website ๐ contributte.org | Contact ๐จ๐ปโ๐ป f3l1x.io | Twitter ๐ฆ @contributte
This project is no longer being maintained. Please use contributte/event-dispatcher-extra. |
---|
Composer | contributte/event-security-bridge |
---|---|
Version | |
PHP | |
License |
State | Version | Branch | PHP |
---|---|---|---|
stable | ^0.1 |
master |
>= 5.6 |
extensions:
events: Contributte\EventDispatcher\DI\EventDispatcherExtension
events2security: Contributte\Events\Bridges\Security\DI\EventSecurityBridgeExtension
There are several Nette Security events on which you can listen to.
use Contributte\Events\Bridges\Security\Event\LoggedInEvent;
use Contributte\Events\Bridges\Security\Event\LoggedOutEvent;
LoggedInEvent::NAME
&&SecurityEvents::ON_LOGGED_IN
LoggedOutEvent::NAME
&&SecurityEvents::ON_LOGGED_OUT
use Contributte\EventDispatcher\EventSubscriber;
use Contributte\Events\Bridges\Security\Event\LoggedInEvent;
use Contributte\Events\Bridges\Security\Event\SecurityEvents;
final class LoggedInSubscriber implements EventSubscriber
{
/**
* @return array
*/
public static function getSubscribedEvents()
{
return [SecurityEvents::ON_LOGGED_IN => 'onLoggedIn'];
}
/**
* @param LoggedInEvent $event
* @return void
*/
public function onLoggedIn(LoggedInEvent $event)
{
// do magic
}
}
This package was maintain by these authors.
Consider to support contributte development team. Also thank you for being used this package.