Reputation: 21
class Demo extends CI_Controller
{
function __construct()
{
parent::__construct();
}
}
Upvotes: 0
Views: 2099
Reputation: 646
class Demo
is extending the CI_Controller
.
So all the public properties of CI_Controller
can be overridden by class Demo
.
function __construct()
means that constructor
if the class Demo
.
In the function __construct()
, parent::__construct()
means that in the constructor, we are also calling the constructor of the parent class.
Upvotes: 3
Reputation: 8881
Demo class's constructor is calling its parent class's constructor which in this case is CI_Controller
Upvotes: 5