How would Flow3 runtime constraints be done ZF2?
Here’s snippet from Flow3’s documentation.
Runtime constraints
Runtime constraints are a very poweful feature of FLOW3’s AOP
framework. A full reference of the possibilities can be found in the
AOP chapter of this documentation. However, this features was mainly
implemented to support sophisticated policy definitions and therefore
here is a short introduction by two simple examples on how to use it:Example: runtime constraints usage in the security policy
-
resources:
methods:
TYPO3_FooPackage_firstResource: 'method(TYPO3\FooPackage\SomeClass->updateProject(title != "FLOW3"))'
TYPO3_FooPackage_secondResource: TYPO3_FooPackage_firstResource && evaluate(current.securityContext.party.name == "Andi")
The above configuration defines a resource that matches on the
updateProject method only if it is not called with the title arugment
equal to “FLOW3”. The second resource matches if the first one matches
and the name property of the currently authenticated party is equal to
“Andi”.
http://flow3.typo3.org/documentation/guide/partiii/security.html
There’s nothing directly equivalent. I would look at using
Zend\Acl‘s Assertions system.