hi,
I believe PHP deals with classes the same way as other OOP programming languages.But surprisingly it does not, I hope. Here is a situation I came across, I have 2 classes "Controller" and "Controller_login" where
class Controller_login extends Controller
There is a method in "Controller" named "getModel()", which I want to call from "Controller_login". To my surprise, if I call it directly as "getModel()", PHP throws an error. To solve this I am calling the method as
parent::getModel();
which solves my problem.
In a general OOP environment this should not have happened?!!
I am concluding that PHP has got this peculiar behaviour, so one has to live with it.
Please suggest whether my understanding is correct ?
thank you