I have a parent class:
Abstract Class Base {
function __construct($registry) {
}
}
Then I have at least 2 classes that extend this class
class Cms extends Base {
}
and this one
class Index extends Base {
}
For the CMS class, the user will have to log in. The session is already running, and I want to verify that the user is logged in using the var session. So I would like to do this:
class Cms extends Base {
function __construct()
{
}
}
but of course, this will overwrite the parent class of the construct and everything that it defines. Is there a way to have a method like __construct () that can be defined in a child class?
ed209 source
share