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

Source for file EventHandlerCollection.php

Documentation is available at EventHandlerCollection.php

  1. <?php
  2.  
  3.  /**
  4.  * EventHandlerCollection 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.      private $handlers;
  17.  
  18.      public function __construct()
  19.      {
  20.           $this->handlers new ArrayObject();
  21.      }
  22.  
  23.      public function Add($handler)
  24.      {
  25.           $this->handlers->Append($handler);
  26.      }
  27.  
  28.      public function RaiseEvent($event$sender$args)
  29.      {
  30.           foreach ($this->handlers as $handler)
  31.           {
  32.               if ($handler->GetEventName(== $event)
  33.                    $handler->Raise($sender$args);
  34.           }
  35.      }
  36. }
  37. ?>

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