PHP Class Imbo\EventListener\AccessControl

This event listener will listen to all access-controlled resources and check if the public key has access to the requested resource. If the public key does not have access to the resource, the listener will throw an exception resulting in a HTTP response with 400 Bad Request. It will also handle loading of ACL-related resources such as resource groups.
Author: Espen Hovlandsdal ([email protected])
Inheritance: implements Imbo\EventListener\ListenerInterface
Datei anzeigen Open project: imbo/imbo

Public Methods

Method Description
__construct ( array $params = null ) Class constructor
checkAccess ( Imbo\EventManager\EventInterface $event ) Check if the public key used has access to this resource for this user
getSubscribedEvents ( )
loadGroups ( Imbo\EventManager\EventInterface $event ) Load groups from the configured access control adapter
subscribe ( Imbo\EventManager\EventInterface $event ) Figure out which resources we have available and subscribe to them

Method Details

__construct() public method

Class constructor
public __construct ( array $params = null )
$params array Parameters for the listener

checkAccess() public method

Check if the public key used has access to this resource for this user
public checkAccess ( Imbo\EventManager\EventInterface $event )
$event Imbo\EventManager\EventInterface

getSubscribedEvents() public static method

public static getSubscribedEvents ( )

loadGroups() public method

Load groups from the configured access control adapter
public loadGroups ( Imbo\EventManager\EventInterface $event )
$event Imbo\EventManager\EventInterface An event instance

subscribe() public method

Figure out which resources we have available and subscribe to them
public subscribe ( Imbo\EventManager\EventInterface $event )
$event Imbo\EventManager\EventInterface