Example #1
0
 /**
  * Filters a value by calling all listeners of a given event.
  *
  * @param  sfEvent  $event   A sfEvent instance
  * @param  mixed    $value   The value to be filtered
  *
  * @return sfEvent The sfEvent instance
  */
 public function filter(Event $event, $value)
 {
     foreach ($this->getListeners($event->getName()) as $listener) {
         $value = call_user_func_array($listener, array($event, $value));
     }
     $event->setReturnValue($value);
     return $event;
 }