note 13359 deleted from language.oop by vincent

From: Date: Thu, 11 Sep 2003 19:54:42 +0000
Subject: note 13359 deleted from language.oop by vincent
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-56193@lists.php.net to get a copy of this message
Note Submitter: ntunali@isbank.net.tr ---- Event Driven!!!!!!! <? // ============ your class (anywhere) ======================= class a { var $t; function lets_call() { if (!empty($this->t)) call_user_func($this->t); } } //================= your codes =============================== $new_class=new a; function ex_one(){ echo 'ex_one function' .'<br>'; } function ex_two() { echo 'ex_two function'.'<br>'; } $new_class->t='ex_one'; $new_class->lets_call(); $new_class->t='ex_two'; $new_class->lets_call(); // ==================== That's all ============================== ?>

« previous php.notes (#56193) next »