[PHP] Re: OOP - Calling methods from classes that are inheriting?

2008-09-21 Thread Lupus Michaelis
Ben Stones a écrit : Hope I have made myself as clear as possible! I did'nt understand what you mean, but I guess you're seeking for the parent keyword. Read again the PHP manual about OOP. -- Mickaël Wolff aka Lupus Michaelis http://lupusmic.org -- PHP General Mailing List

Re: [PHP] Re: OOP - Calling methods from classes that are inheriting?

2008-09-21 Thread Ben Stones
Hi, maybe if I post below what I'm trying to do it may make more sense: class myClass { public function func() { $hello = Yay!!; } } class otherClass extends myClass { public function otherFunc() { echo parent::func(); } }

Re: [PHP] Re: OOP - Calling methods from classes that are inheriting?

2008-09-21 Thread Maciek Sokolewicz
class myClass { public function func() { return Yay!!; } } class otherClass extends myClass { public function otherFunc() { echo $this-func(); } } $class=new otherClass(); echo $class-otherFunc(); oh yes, it's that simple. 2

Re: [PHP] Re: OOP - Calling methods from classes that are inheriting?

2008-09-21 Thread Jochem Maas
Maciek Sokolewicz schreef: class myClass { public function func() { return Yay!!; } } class otherClass extends myClass { public function otherFunc() { echo $this-func(); } } $class=new otherClass(); echo $class-otherFunc(); oh yes, it's that simple. 2 things to