PHP Class Bolt\EventListener\AccessControlListener

Author: Gawain Lynch ([email protected])
Inheritance: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
显示文件 Open project: bolt/bolt

Protected Properties

Property Type Description
$em Bolt\Storage\EntityManagerInterface
$filesystem Bolt\Filesystem\FilesystemInterface
$sessionStorage Bolt\Session\SessionStorage

Public Methods

Method Description
__construct ( Bolt\Filesystem\FilesystemInterface $filesystem, Bolt\Session\SessionStorage $sessionStorage, Bolt\Storage\EntityManagerInterface $em ) Constructor.
getSubscribedEvents ( )
onStorageEventPostSave ( Bolt\Events\StorageEvent $event ) Remove sessions & authtokens when a user is disabled.
onStorageEventPreDelete ( Bolt\Events\StorageEvent $event ) Remove sessions & authtokens when a user is deleted.

Private Methods

Method Description
deleteAuthtokens ( Bolt\Storage\Entity\Users $user ) Delete any save authtokens for a user.
deleteSessions ( Bolt\Storage\Entity\Users $user ) Delete active session files for a user.

Method Details

__construct() public method

Constructor.
public __construct ( Bolt\Filesystem\FilesystemInterface $filesystem, Bolt\Session\SessionStorage $sessionStorage, Bolt\Storage\EntityManagerInterface $em )
$filesystem Bolt\Filesystem\FilesystemInterface
$sessionStorage Bolt\Session\SessionStorage
$em Bolt\Storage\EntityManagerInterface

getSubscribedEvents() public static method

public static getSubscribedEvents ( )

onStorageEventPostSave() public method

Remove sessions & authtokens when a user is disabled.
public onStorageEventPostSave ( Bolt\Events\StorageEvent $event )
$event Bolt\Events\StorageEvent

onStorageEventPreDelete() public method

Remove sessions & authtokens when a user is deleted.
public onStorageEventPreDelete ( Bolt\Events\StorageEvent $event )
$event Bolt\Events\StorageEvent

Property Details

$em protected_oe property

protected EntityManagerInterface,Bolt\Storage $em
return Bolt\Storage\EntityManagerInterface

$filesystem protected_oe property

protected FilesystemInterface,Bolt\Filesystem $filesystem
return Bolt\Filesystem\FilesystemInterface

$sessionStorage protected_oe property

protected SessionStorage,Bolt\Session $sessionStorage
return Bolt\Session\SessionStorage