class Foo {
public function sampleA(){
echo "something ...";
}
}
class Bar {
public function sampleB(){
echo "something ...";
}
}
$objectA = new Foo();
I want to call $objectA->sampleB() directly, not $objectA->somevariable->sampleB(); How to do this?