Posted: Mon Nov 01, 2004 3:54 pm
The problem with that is that the class must be already instantiated in order to do that.
You could do something like:
but it would only work if this is define on the subclass that you are instantiating
You could do something like:
Code: Select all
<?
function & create() {
$class_name = __CLASS__;
return new $class_name;
}
?>