* message stack.
*
* @param array $events The list of events to handle.
- * @param array $options An array of options:
- * <pre>
- * 'mobile' - (Horde_Mobile) The mobile object to send status lines to.
- * </pre>
+ * @param array $options An array of options. Not used.
*/
public function notify($events, $options = array())
{
return;
}
- if (!empty($options['mobile']) && class_exists('Horde_Mobile_Text')) {
- foreach ($events as $event) {
- $options['mobile']->add(new Horde_Mobile_Text(strip_tags($event)));
- }
- return;
- }
-
echo '<ul class="notices">';
foreach ($events as $event) {
<channel>pear.horde.org</channel>
</package>
<package>
- <name>Mobile</name>
- <channel>pear.horde.org</channel>
- </package>
- <package>
<name>Nls</name>
<channel>pear.horde.org</channel>
</package>
$listener->notify($messages);
}
- public function testMethodNotifyHasMobileOutputIfTheMobileOptionWasSet()
- {
- if (!class_exists('Horde_Mobile')) {
- $this->markTestSkipped('The Horde_Mobile package is not installed!');
- }
- $mobile = $this->getMock('Horde_Mobile', array(), array(), '', false, false);
- $mobile->expects($this->once())
- ->method('add')
- ->with($this->isInstanceOf('Horde_Mobile_Text'));
- $listener = new Horde_Notification_Listener_Status();
- $event = new Horde_Notification_Event('<b>test</b>');
- $messages = array($event);
- $listener->notify($messages, array('mobile' => $mobile));
- }
-
}