package Default

 Methods

Stacks an assertion in aggregate

addAssertion(\Zend\Permissions\Acl\Assertion\AssertionInterface|string $assertion) : \Zend\Permissions\Acl\Assertion\AssertionAggregate
fluent This method is part of a fluent interface and will return the same instance

Parameters

$assertion

\Zend\Permissions\Acl\Assertion\AssertionInterfacestring

if string, must match a AssertionManager declared service (checked later)

Returns

\Zend\Permissions\Acl\Assertion\AssertionAggregate

addAssertions()

addAssertions(array $assertions) 

Parameters

$assertions

Returns true if and only if the assertion conditions are met

assert(\Zend\Permissions\Acl\Acl $acl, \Zend\Permissions\Acl\Role\RoleInterface $role = null, \Zend\Permissions\Acl\Resource\ResourceInterface $resource = null, string $privilege = null) : boolean

This method is passed the ACL, Role, Resource, and privilege to which the authorization query applies. If the $role, $resource, or $privilege parameters are null, it means that the query applies to all Roles, Resources, or privileges, respectively.

see
inherited_from \Zend\Permissions\Acl\Assertion\AssertionInterface::assert()

Parameters

$acl

$role

$resource

$privilege

Exceptions

\Zend\Permissions\Acl\Exception\RuntimeException

Returns

boolean

Empties assertions stack

clearAssertions() : \Zend\Permissions\Acl\Assertion\AssertionAggregate
fluent This method is part of a fluent interface and will return the same instance

Returns

\Zend\Permissions\Acl\Assertion\AssertionAggregate

getAssertionManager()

getAssertionManager() 

Return current mode

getMode() : string

Returns

string

setAssertionManager()

setAssertionManager(\Zend\Permissions\Acl\Assertion\AssertionManager $manager) : \Zend\Permissions\Acl\Assertion\AssertionAggregate
fluent This method is part of a fluent interface and will return the same instance

Parameters

$manager

\Zend\Permissions\Acl\Assertion\AssertionManager

Returns

\Zend\Permissions\Acl\Assertion\AssertionAggregate

Set assertion chain behavior

setMode(string $mode) : \Zend\Permissions\Acl\Assertion\AssertionAggregate

AssertionAggregate should assert to true when:

  • all assertions are true with MODE_ALL
  • at least one assertion is true with MODE_AT_LEAST_ONE
fluent This method is part of a fluent interface and will return the same instance

Parameters

$mode

string

indicates how assertion chain result should interpreted (either 'all' or 'at_least_one')

Exceptions

\Zend\Permissions\Acl\Exception\InvalidArgumentException

Returns

\Zend\Permissions\Acl\Assertion\AssertionAggregate

 Properties

 

AssertionManager

$assertionManager : 

Default

 

$assertions

$assertions 

Default

array()
 

$mode

$mode 

Default

self::MODE_ALL

 Constants

 

MODE_ALL

MODE_ALL = 'all' 
 

MODE_AT_LEAST_ONE

MODE_AT_LEAST_ONE = 'at_least_one'