Jump to content

Ways to get parent class' variables


play_

Recommended Posts

AS scootstah has pointed out a parents properties are available as if they are defined within the child class.

 

parent::$this->whatever;

 

Does make allot of sense. Maybe show us a simple example of what it is your referring to because really, to access a parents property is no different than accessing any other property. eg;

 

$this->var;

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.