Page 1 of 1

use of parnet - accessing base class attributes and methodss

Posted: Tue Jul 23, 2002 3:08 am
by neh
Hi

I'm trying to get to grips with PHP and am building a site framework using a number of the enterprise java patterns (intercepting filter, front controller etc) - but I'm having some difficulties getting to grips with PHP's OO features .. specificially the keyword $parent isnt working how I'd expect ..

can anyone confirm whether if I extend a base class I will be able to access its attributes and methods from inside the subclass .. from my book and the docs I'd assumed use of the $parent keyword would give a pointer to the base class but it keeps giving me a Undeclared variable warning and then obviously the rest of the code falls down thats dependant on vars or methods I'm trying to access

....

Posted: Tue Jul 23, 2002 3:43 am
by neh
ok .. figured that you just use the $this keyword to access all of the inherited att and methods ..