Componette

Componette

contributte

contributte / event-security-bridge v0.1

๐Ÿ’€ [DISCONTINUED] Symfony Event Dispatcher and Nette Security (@nette) bridge. Use contributte/event-dispatcher-extra.

download-cloud-line composer require contributte/event-security-bridge

Website ๐Ÿš€ contributte.org | Contact ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป f3l1x.io | Twitter ๐Ÿฆ @contributte

Disclaimer

โš ๏ธ This project is no longer being maintained. Please use contributte/event-dispatcher-extra.
Composer contributte/event-security-bridge
Version
PHP
License

Versions

State Version Branch PHP
stable ^0.1 master >= 5.6

Usage ๐ŸŽ‰

extensions:
	events: Contributte\EventDispatcher\DI\EventDispatcherExtension
	events2security: Contributte\Events\Bridges\Security\DI\EventSecurityBridgeExtension

Bridge ๐Ÿ”ง

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

Subscriber ๐Ÿ’ก

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
	}

}

Development

This package was maintain by these authors.


Consider to support contributte development team. Also thank you for being used this package.

  • v0.1 v0.1

    Bumped! ๐Ÿ‘Š

Componette Componette felix@nette.org