*/
public function notify(array $options = array())
{
- $this->setNotificationListeners($options);
+ $options = $this->setNotificationListeners($options);
$this->notifyListeners($options);
}
* @param array $options An array containing display options for the
* listeners.
*/
- public function setNotificationListeners(array &$options)
+ public function setNotificationListeners(array $options)
{
if (!isset($options['listeners'])) {
$options['listeners'] = $this->getListeners();
$options['listeners'] = array($options['listeners']);
}
$options['listeners'] = array_map(array('Horde_String', 'lower'), $options['listeners']);
+ return $options;
}
/**
*/
public function notify(array $options = array())
{
- $this->_handler->setNotificationListeners($options);
+ $options = $this->_handler->setNotificationListeners($options);
if (in_array('status', $options['listeners'])) {
$this->_alarm->notify(Horde_Auth::getAuth());
* @param array $options An array containing display options for the
* listeners.
*/
- public function setNotificationListeners(array &$options)
+ public function setNotificationListeners(array $options)
{
- $this->_handler->setNotificationListeners($options);
+ return $this->_handler->setNotificationListeners($options);
}
/**
* @param array $options An array containing display options for the
* listeners.
*/
- public function setNotificationListeners(array &$options)
+ public function setNotificationListeners(array $options)
{
- $this->_handler->setNotificationListeners($options);
+ return $this->_handler->setNotificationListeners($options);
}
/**
* @param array $options An array containing display options for the
* listeners.
*/
- public function setNotificationListeners(array &$options)
+ public function setNotificationListeners(array $options)
{
- $this->_handler->setNotificationListeners($options);
+ return $this->_handler->setNotificationListeners($options);
}
/**
* @param array $options An array containing display options for the
* listeners.
*/
- public function setNotificationListeners(array &$options);
+ public function setNotificationListeners(array $options);
/**
* Passes the message stack to all listeners and asks them to
->with('');
$this->handler->expects($this->once())
->method('setNotificationListeners')
- ->with(array('listeners' => array('status')));
+ ->with(array('listeners' => array('status')))
+ ->will($this->returnValue(array('listeners' => array('status'))));
$this->handler->expects($this->once())
->method('notifyListeners')
->with(array('listeners' => array('status')));
{
$this->handler->expects($this->once())
->method('setNotificationListeners')
- ->with(array('listeners' => array('test')));
+ ->with(array('listeners' => array('test')))
+ ->will($this->returnValue(array('listeners' => array('test'))));
$this->handler->expects($this->once())
->method('notifyListeners')
->with(array('listeners' => array('test')));