I have model
BaseUser.class.php
User.class.php
UserTable.class.php
In user Class I have been override the delete function
It can be done using call_user_func
. Yes, its bad practice, but its possible.
class BaseUser {
public function delete()
{
echo 'BaseUser deleted';
}
}
class User extends BaseUser{
public function delete()
{
echo 'User deleted';
}
}
$instance = new User();
call_user_func(array($instance, 'parent::delete'));
result:
BaseUser deleted