[ Index ]
 

Code source de Horde 3.1.3

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/Horde/Notification/Listener/ -> audio.php (source)

   1  <?php
   2  
   3  require_once 'Horde/Notification/Listener.php';
   4  
   5  /**
   6   * The Notification_Listener_audio:: class provides functionality for
   7   * inserting embedded audio notifications from the stack into the page.
   8   *
   9   * $Horde: framework/Notification/Notification/Listener/audio.php,v 1.3.2.2 2006/01/01 21:28:30 jan Exp $
  10   *
  11   * Copyright 2005-2006 Cronosys, LLC <http://www.cronosys.com/>
  12   *
  13   * See the enclosed file COPYING for license information (LGPL). If you
  14   * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  15   *
  16   * @author  Jason M. Felice <jfelice@cronosys.com>
  17   * @since   Horde 3.0
  18   * @package Horde_Notification
  19   */
  20  class Notification_Listener_audio extends Notification_Listener {
  21  
  22      /**
  23       * Constructor
  24       */
  25      function Notification_Listener_audio()
  26      {
  27          $this->_handles = array('audio' => '');
  28      }
  29  
  30      /**
  31       * Return a unique identifier for this listener.
  32       *
  33       * @return string  Unique id.
  34       */
  35      function getName()
  36      {
  37          return 'audio';
  38      }
  39  
  40      /**
  41       * Outputs the embedded audio code if there are any messages on the
  42       * 'audio' message stack.
  43       *
  44       * @param array &$messageStack     The stack of messages.
  45       * @param array $options  An array of options.
  46       */
  47      function notify(&$messageStack, $options = array())
  48      {
  49          if (count($messageStack)) {
  50              while ($message = array_shift($messageStack)) {
  51                  $this->getMessage($message);
  52              }
  53          }
  54      }
  55  
  56      /**
  57       * Outputs one message.
  58       *
  59       * @param array $message  One message hash from the stack.
  60       */
  61      function getMessage($message)
  62      {
  63          $event = $this->getEvent($message);
  64          echo '<embed src="', htmlspecialchars($event->getMessage()),
  65               '" width="0" height="0" autostart="true" />';
  66      }
  67  
  68  }


Généré le : Sun Feb 25 18:01:28 2007 par Balluche grâce à PHPXref 0.7