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