ZF-7895: Add methods to get defined ressources
Description
Add a method to get registered resources.
Note: Three enhancements were requested in ZF-5638. A method now exists to get defined roles. ZF-5638 is now closed.
Add a method to get registered resources.
Note: Three enhancements were requested in ZF-5638. A method now exists to get defined roles. ZF-5638 is now closed.
Comments
Posted by Sudheer Satyanarayana (bonaparte) on 2009-09-19T06:56:50.000+0000
Patch adds method to retrieve registered resources
Posted by Dolf Schimmel (Freeaqingme) (freak) on 2009-09-22T10:25:19.000+0000
As said earlier:
I would personally expect a getRegisteredRoles() or getRegisteredResources() (ZF-7895) to return a single dimensional-array containing the name of all roles/resources. The methods as implemented by this patch however return a multidimensional array with all the roles&resources objects, which I kinda feel is unworkable. To check if a certain resource has been registered already someone would now have to flatten the tree himself first and then call something like in_array(); or array_key_exists(). I can think of no usecase in which it's useful to have the entire resources tree as a multidimensional array. That is handy only to Zend_Acl itself.
Posted by Dolf Schimmel (Freeaqingme) (freak) on 2009-12-08T13:33:59.000+0000
Closed with the resolving of #ZF-8468.