Posted by Ryan van Roode on 05/25/07 06:07
Hello,
An API function gives me an object of class 'Blah'. I have subclassed
'Blah' and added a few methods:
class EnhancedBlah extends Blah {
function enhancement1() {}
function enhancement2() {}
}
Is there a way to 'downcast' the object to a subclass? Something like
this:
$blah = SuperApi::getBlah();
$enhancedBlah = (EnhancedBlah) $blah;
Thanks for your help.
~RvR
Navigation:
[Reply to this message]
|