ZF-7150: Method to get all used namespaces

Description

In my case, I want to get into a view helper all messages from different namespaces (error, warning, notice, ok). A method like this is very helpful to handle this situation.


/**
 * getCurrentNamespaces() - get all used namespaces
 *
 * @return array
 */
public function getCurrentNamespaces()
{
    return array_keys(self::$_messages);
}
    
/**
 * getNamespaces() - get all used namespaces
 *
 * @return array
 */
public function getNamespaces()
{
    $namespaces = array();
    foreach (self::$_session as $key => $namespace) {
        $namespaces[] = $key;
    }
    return $namespaces;
}

Comments

Maybe this is not the best solution, sorry. I resolve better without these two method but using only hasMessages() and hasCurrentMessages.

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.