TeeChartPHP
[ class tree: TeeChartPHP ] [ index: TeeChartPHP ] [ all elements ]

Source for file EventListenerList.php

Documentation is available at EventListenerList.php

  1. <?php
  2.  
  3.  /**
  4.  * EventListenerList class
  5.  *
  6.  * Description:
  7.  *
  8.  * @author
  9.  * @copyright (c) 1995-2008 by Steema Software SL. All Rights Reserved. <info@steema.com>
  10.  * @version 1.0
  11.  * @package TeeChartPHP
  12.  * @subpackage events
  13.  * @link http://www.steema.com
  14.  */
  15.  
  16. /* todo remove
  17.  
  18.   protected $listeners = array();
  19.  
  20.   function add($listener) {
  21.     $this->listeners[] = $listener;
  22.   }
  23.  
  24.   function getRaw() {
  25.     return $this->listeners;
  26.   }
  27. */
  28.  
  29.      private $events;
  30.  
  31.      public function __construct()
  32.      {
  33.           $this->events new ArrayObject();
  34.      }
  35.  
  36.      public function Add($event)
  37.      {
  38.           if (!$this->Contains($event))
  39.               $this->events->Append($event);
  40.      }
  41.  
  42.      public function Contains($event)
  43.      {
  44.           foreach ($this->events as $e)
  45.           {
  46.               if ($e->GetName(== $event)
  47.                    return true;
  48.           }
  49.      }
  50.  
  51. }
  52. ?>

Documentation generated on Wed, 16 Jun 2010 12:05:11 +0200 by phpDocumentor 1.4.1