note 59785 deleted from function.get-class by bjori
| From: | bjori@php.net | Date: | Sun, 26 Mar 2006 12:30:52 +0000 |
| Subject: | note 59785 deleted from function.get-class by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-106631@lists.php.net to get a copy of this message | ||
Note Submitter: darkfalconIV at hotmail dot com
----
davidc, that doesn't exactly work. As soon as you inherit everything breaks...
<?php
class Monkey
{
public static function getType(){
return __CLASS__;
}
}
class Man extends Monkey
{
}
?>
will return ''Monkey" if you call Man::getType(), which is not what we want. I really
can't think of any possible workaround that is inheritable(i.d., not doing something like
defining a class constant with the classes name in each class). If you want it to be fixed, good
luck...
http://bugs.php.net/bug.php?id=30423