adding functions to a class

From: Date: Tue, 04 Sep 2001 19:47:46 +0000
Subject: adding functions to a class
Groups: php.general 
Request: Send a blank email to php-general+get-65934@lists.php.net to get a copy of this message
hi, picture I have a class with some variable holding the information of this class. Now there are some functions to manipulate the vars. well, you nou what classes are about. but now I want to add functions that are located in a different php file. but this functions need to use the the var of the class. bassicly what a want is extends the original class with more functionalities like. you could see it as adding plug-ins in a program. So I don't want to just copy past the functions in the original class file. class a { var VAR1 var VAR2 var VAR3 require(morefunctions.php); function a($param) { ...... } function test2($param) { ...... } } the require(morefunctions.php); will ofcource not work but bassicly this is what I want. en all the functions added should be able to use VAR1 VAR2 VAR3 (and the other functions that are allready in the class) is there a why to do this ?? kind regards Jeroen Olthof

« previous php.general (#65934) next »