Overview

Packages

  • Notification

Classes

  • Horde_Notification
  • Horde_Notification_Event
  • Horde_Notification_Event_Status
  • Horde_Notification_Exception
  • Horde_Notification_Handler
  • Horde_Notification_Handler_Decorator_Alarm
  • Horde_Notification_Handler_Decorator_Base
  • Horde_Notification_Handler_Decorator_Log
  • Horde_Notification_Listener
  • Horde_Notification_Listener_Audio
  • Horde_Notification_Listener_Status
  • Horde_Notification_Storage_Object
  • Horde_Notification_Storage_Session

Interfaces

  • Horde_Notification_Storage_Interface
  • Overview
  • Package
  • Class
  • Tree
 1: <?php
 2: /**
 3:  * The Horde_Notification_Listener_Audio:: class provides functionality for
 4:  * inserting embedded audio notifications from the stack into the page.
 5:  *
 6:  * Copyright 2005-2012 Horde LLC (http://www.horde.org/)
 7:  *
 8:  * See the enclosed file COPYING for license information (LGPL). If you
 9:  * did not receive this file, see http://www.horde.org/licenses/lgpl21.
10:  *
11:  * @author   Jason M. Felice <jason.m.felice@gmail.com>
12:  * @category Horde
13:  * @license  http://www.horde.org/licenses/lgpl21 LGPL 2.1
14:  * @package  Notification
15:  */
16: class Horde_Notification_Listener_Audio extends Horde_Notification_Listener
17: {
18:     /**
19:      * Constructor.
20:      */
21:     public function __construct()
22:     {
23:         $this->_handles['audio'] = 'Horde_Notification_Event';
24:         $this->_name = 'audio';
25:     }
26: 
27:     /**
28:      * Outputs the embedded audio code if there are any messages on the
29:      * 'audio' message stack.
30:      *
31:      * @param array $events   The list of events to handle.
32:      * @param array $options  An array of options (not used).
33:      */
34:     public function notify($events, $options = array())
35:     {
36:         foreach ($events as $event) {
37:             echo '<embed src="' . htmlspecialchars(strval($event)) . '" width="0" height="0" autostart="true" />';
38:         }
39:     }
40: 
41: }
42: 
API documentation generated by ApiGen