I have 3 classes with the following inheritance structure:
<?php
class admin {
function __construct($module){
echo $module;
}
}
class user_admin extends admin {
function __construct(){
parent::__construct('user');
}
}
class sales_admin extends user_admin {
function __construct(){
parent::__construct('sales');
}
}
You'll notice that the sales_admin extends the user_admin, this is a nescessary step. When I run this code,
$a = new sales_admin;
it will echo "user", because it passes the "sales" string to the user_admin which doesn't accept a constructor.
Is there a way to access the constructor of the parent above it without changing the user_admin, which I don't have control over?