Zend Framework

Add methods to get defined ressources

Details

  • Type: New Feature New Feature
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.2
  • Fix Version/s: 1.10.0
  • Component/s: Zend_Acl
  • Labels:
    None

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.

Activity

Hide
Sudheer Satyanarayana added a comment -

Patch adds method to retrieve registered resources

Show
Sudheer Satyanarayana added a comment - Patch adds method to retrieve registered resources
Hide
Dolf Schimmel (Freeaqingme) added a comment -

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.

Show
Dolf Schimmel (Freeaqingme) added a comment - 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.
Hide
Dolf Schimmel (Freeaqingme) added a comment -

Closed with the resolving of #ZF-8468.

Show
Dolf Schimmel (Freeaqingme) added a comment - Closed with the resolving of #ZF-8468.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: