Welcome Guest, Not a member yet? Register   Sign In
function __construct
#1

[eluser]Iwasignited[/eluser]
Hello,

I have a question about this.
I want to perform some default task in my controller.
I see some guys doing function__construct
but Im a bit confused about
'parent::'

We do
Code:
class Site extends Controller
{
    function __construct()
    {
        parent::__construct();
    }
or
Code:
class Site extends Controller
{
    function __construct()
    {
        parent::Site;
    }

Looking forward to hearing from you soon.
Thanks
#2

[eluser]K-Fella[/eluser]
It needs to be:
Code:
parent::Controller();




Theme © iAndrew 2016 - Forum software by © MyBB