Re: [PHP4BETA] calling member in parent class

From: Date: Sun, 06 Feb 2000 01:29:00 +0000
Subject: Re: [PHP4BETA] calling member in parent class
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-9866@lists.php.net to get a copy of this message
On Sat, 5 Feb 2000 chagenbu@wso.williams.edu wrote: > I don't follow. If you use a code library - via include(), require(), or > possibly use() now - and you extend classes that the library provides, and in > your extended classes you call parent::foomethod()... > > If the library changes the name of a class you've used, you have effects _far_ > outside of one file. I buy the argument that it's not an essential feature, and > that you want to keep the language simple. But unless I'm missing something > major, the argument that you can't have effects outside of a single file doesn't > hold water. Since you already have to change the name of the class that your extending, it's only a matter of a search&replace on *that file*. Example: Foo.php: class Foo { ... } Bar.php: class Bar extends Foo { ... Foo::afun() ... } Now, when Foo changes to Foop, you *have* to change "class Bar extends Foo" to "class Bar extends Foop" anyway, so what's the big deal about searching and replacing in the entire file? Peter -------------------------------------------------- Peter D. Kovacs KnowPost.com LLC Pb Engineer peter@knowpost.com --------------------------------------------------

« previous php.version4 (#9866) next »