\Acl\AssertionAbstractEventManagerAwareAssertion

Skeleton for an EventManagerAware Assertion.

Handles the management of the EventManager, the creation of the AssertionEvent, triggers the event and introspecting the result set.

Listeners to that event should return a simple boolean value. Other return types are treated as they were the boolean TRUE. If a listener returns FALSE the propagation is stopped immediatly and no further listeners are invoked. The assertion returns FALSE in this case.

Summary

Methods
Properties
Constants
setEventManager()
getEventManager()
assert()
No public properties found
No constants found
getEventManagerIdentifiers()
preAssert()
$events
$identifiers
N/A
No private methods found
No private properties found
N/A

Properties

$events

$events : \Zend\EventManager\EventManagerInterface

The Event manager.

Type

\Zend\EventManager\EventManagerInterface

$identifiers

$identifiers : string[]

Identifiers for the SharedEventManager

Type

string[]

Methods

setEventManager()

setEventManager(\Zend\EventManager\EventManagerInterface $eventManager)

Parameters

\Zend\EventManager\EventManagerInterface $eventManager

getEventManager()

getEventManager()

assert()

assert(\Zend\Permissions\Acl\Acl $acl, \Zend\Permissions\Acl\Role\RoleInterface $role, \Zend\Permissions\Acl\Resource\ResourceInterface $resource,  $privilege)

Parameters

\Zend\Permissions\Acl\Acl $acl
\Zend\Permissions\Acl\Role\RoleInterface $role
\Zend\Permissions\Acl\Resource\ResourceInterface $resource
$privilege

getEventManagerIdentifiers()

getEventManagerIdentifiers() : string[]

Gets the identifiers to be used by the SharedEventManager.

Overwrite this to manipulate identifiers.

Returns

string[]

preAssert()

preAssert(\Zend\Permissions\Acl\Acl $acl, \Zend\Permissions\Acl\Role\RoleInterface $role, \Zend\Permissions\Acl\Resource\ResourceInterface $resource, null|string $privilege) : null|bool

Overwrite this to check some conditions before the event is triggered.

If this method returns a boolean value, this value will be returned as the assertions' result and no event will be triggered.

Parameters

\Zend\Permissions\Acl\Acl $acl
\Zend\Permissions\Acl\Role\RoleInterface $role
\Zend\Permissions\Acl\Resource\ResourceInterface $resource
null|string $privilege

Returns

null|bool