PHP code example of contributte / event-security-bridge
1. Go to this page and download the library: Download contributte/event-security-bridge library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
contributte / event-security-bridge example snippets
use Contributte\Events\Bridges\Security\Event\LoggedInEvent;
use Contributte\Events\Bridges\Security\Event\LoggedOutEvent;
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
}
}