Is there a method to convert an instance of an object to another class?
e.g.
PHP Code:class SimpleObject {}
class AdvancedObject {
public function AdvancedMethod()
{
}
}
$object1 = new SimpleObject();
// cast
$object1 = (AdvancedObject) $object1;
echo $object1->AdvancedMethod();






Bookmarks