[dev] added Notification::count()
   
    David Ulevitch
     
    davidu@everydns.net
       
    Tue, 2 Jul 2002 10:51:10 -0700 (PDT)
    
    
  
This might be useful to some people:
In Notification.php:
function count($my_listener = '') {
 if ($my_listener == '') {
  $count = 0;
  foreach ($this->listeners as $listener) {
   $count += count($_SESSION['hordeMessageStacks'][$listener->getName()]);
  }
  return $count;
 } else {
  return
count($_SESSION['hordeMessageStacks'][$this->listeners[$my_listener]->getName()]);
 }
}
I needed it because I test if there are a certain amount of errors it send
them to a massive oops page.
thanks,
davidu
-- 
"Never doubt that a small group of thoughtful citizens can change the
world. Indeed, it is the only thing that ever has." --Margaret Mead