[ Index ] |
|
Code source de e107 0.7.8 |
1 <?php 2 /* 3 + ----------------------------------------------------------------------------+ 4 | e107 website system 5 | 6 | ©Steve Dunstan 2001-2002 7 | http://e107.org 8 | jalist@e107.org 9 | 10 | Released under the terms and conditions of the 11 | GNU General Public License (http://gnu.org). 12 | 13 | $Source: /cvsroot/e107/e107_0.7/e107_handlers/event_class.php,v $ 14 | $Revision: 1.10 $ 15 | $Date: 2005/12/14 17:37:34 $ 16 | $Author: sweetas $ 17 +----------------------------------------------------------------------------+ 18 */ 19 20 if (!defined('e107_INIT')) { exit; } 21 22 class e107_event { 23 var $functions = array(); 24 var $includes = array(); 25 26 function register($eventname, $function, $include='') { 27 if ($include!='') { 28 $this->includes[$eventname][] = $include; 29 } 30 $this->functions[$eventname][] = $function; 31 } 32 33 function trigger($eventname, &$data) { 34 if (isset($this -> includes[$eventname])) { 35 foreach($this->includes[$eventname] as $evt_inc) { 36 if (file_exists($evt_inc)) { 37 include_once($evt_inc); 38 } 39 } 40 } 41 if (isset($this -> functions[$eventname])) { 42 foreach($this->functions[$eventname] as $evt_func) { 43 if (function_exists($evt_func)) { 44 $ret = $evt_func($data); 45 if ($ret!='') { 46 break; 47 } 48 } 49 } 50 } 51 return (isset($ret) ? $ret : false); 52 } 53 } 54 55 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 01:23:32 2007 | par Balluche grâce à PHPXref 0.7 |