use of parnet - accessing base class attributes and methodss

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
neh
Forum Newbie
Posts: 16
Joined: Tue Jul 23, 2002 3:08 am

use of parnet - accessing base class attributes and methodss

Post 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
neh
Forum Newbie
Posts: 16
Joined: Tue Jul 23, 2002 3:08 am

....

Post by neh »

ok .. figured that you just use the $this keyword to access all of the inherited att and methods ..
Post Reply