Page 1 of 1

method overloading

Posted: Fri Nov 21, 2008 1:59 am
by nagabushan
hi can any one help me out i have a problem in my php code

the error is

error - Declaration of setup() should be compatible with that of setup()

but i am calling the function setup() of parent class as parent :: setup()

but still its showing the above error


public function setup($dbLink ,$ldapLink, $lang, $user) {
$errorArray = NULL;
$errorMsg = NULL;
$xml = '';
sample code


-----
----

in this i called
parent :: setup($dbLink , $ldapLink, $lang, $user,MODULE);

}

Re: method overloading

Posted: Fri Nov 21, 2008 2:42 am
by japulickal
can you please copy that part of the code where you got the error.
I assume the parent class is having an abstract function setup(). In that case you have to follow the same function signature as that of the parent class.

I can get you more details if you get me the sample code that is showing the error

Thanks,
Jose Antony

Re: method overloading

Posted: Fri Nov 21, 2008 3:13 am
by pcoder