I have a setup, where there's a base class, then several classes that extend off of it... Is it possible to access the extended classes within another?
So for example, class Products extends Base and class Users extends Base... I want to access a function within the Users class within the Products class.....
Thanks!
Accessing other extended classes
Moderator: General Moderators
-
Hieroglyphics
- Forum Newbie
- Posts: 13
- Joined: Wed Jan 20, 2010 8:25 pm
Re: Accessing other extended classes
No it is not possible but what you CAN do is.
Then use like $this->users->functionfromusers()
Code: Select all
private $this->users;
public function __construct() {
include_once('filethatcontainsusersclass.php');
$this->users = new Users();
}Re: Accessing other extended classes
Gotcha.. thanks! 