I'm not sure if this will work, but hey, you could give it a try.
class Car
{
public static $className = __CLASS__;
public static function drive ()
{
return self::$className;
}
}
class Porsche extends Car
{
public static $className = __CLASS__;
}
Not sure if this is the best way to do it or not, but you can do this
and it should (untested code) work.
class Car {
function drive() {
return $this-getClassName();
}
function getClassName() {
return Car;
}
}
class Porshe {
Christopher Fulton [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Not sure if this is the best way to do it or not, but you can do this
and it should (untested code) work.
class Car {
function drive() {
return $this-getClassName();
}
Torsten Roehr wrote:
Christopher Fulton [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Not sure if this is the best way to do it or not, but you can do this
and it should (untested code) work.
class Car {
function drive() {
return $this-getClassName();
}
4 matches
Mail list logo