method overloading

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nagabushan
Forum Newbie
Posts: 2
Joined: Fri Nov 21, 2008 1:53 am

method overloading

Post 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);

}
Last edited by nagabushan on Fri Nov 21, 2008 4:30 am, edited 1 time in total.
japulickal
Forum Newbie
Posts: 1
Joined: Fri Nov 21, 2008 2:38 am

Re: method overloading

Post 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
User avatar
pcoder
Forum Contributor
Posts: 230
Joined: Fri Nov 03, 2006 5:19 am

Re: method overloading

Post by pcoder »

Post Reply