I have class DatabaseAccess from which I inherit two classes: TeamAccess and StatisticsAccess. Now when I create instance of TeamAccess from StatisticsAccess it is of type StatisticsAccess? What is happening here?
Heres the code
class StatisticsAccess extends DatabaseAccess {
public function getMatchesById($matchesid) {
$teamAccess = new TeamAccess();
print_r(new TeamAccess);
}
}
class TeamAccess extends DatabaseAccess {
function __construct() {
parent::__construct();
}
}
print_r shows StatisticsAccess object.