note 41316 deleted from language.oop by aidan
| From: | aidan@php.net | Date: | Sat, 03 Jul 2004 14:47:44 +0000 |
| Subject: | note 41316 deleted from language.oop by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-72433@lists.php.net to get a copy of this message | ||
Note Submitter: mlr at mijoheto dot com
----
When using the :: operator the current $this will be active in the called class
So what u might want to do is to change the "static call test" in Brother to:
if (isset($this) && is_a($this,"Brother)) {
return parent::name();
} else {
print "static call<br>";
}
Note: If u dont have is_a (availabe from 4.2)
use the nice substitution made by "dan at mojavelinux dot com".
@see is_a function, its in the notes.
have fun
Michael