Re: Re: [PHP4BETA] Bug: Isn´t it possible to use require /include to add methods to classes????

From: Date: Fri, 12 May 2000 11:42:04 +0000
Subject: Re: Re: [PHP4BETA] Bug: Isn´t it possible to use require /include to add methods to classes????
References: 1 2  Groups: php.version4 
Request: Send a blank email to php-version4+get-14905@lists.php.net to get a copy of this message
I think that's a good idea. At 12:49 12.5.2000 +0200, André Langhorst wrote the following: -------------------------------------------------------------- >I dit not know that it is not possible to require inside classes outside methods. >Disallowing include() would make sense, but why don´t allow require. What if you need a set of >functions in many classes, of course I could put that function in another class and let the one >extend the other, but multiple extends aren´t suported in php and if I need another extension I´ll >have to modify the whole code and to keep my functions all together. I can´t call it from outside >because of another issue I´ve posted, that variable references aren´t supported for variable >functions. >And before using eval() I´ll cut&paste the code in every class. > >Am I wrong or could this be a nice extensions. Another function which works like require() >before the whole script is parsed replacing itselft entirely with another file.... > >André ------end of quote------ ____________________________________________________________ Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. cynic@mail.cz ICQ: 2808 2505

« previous php.version4 (#14905) next »