OOP Programming
| From: | lametta at shk dot de | Date: | Sun, 08 Aug 1999 18:46:56 +0000 |
| Subject: | OOP Programming | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-3215@lists.php.net to get a copy of this message | ||
Hi,
I just have two questions concerning the OOP with PHP4:
1.) Access the parent-object.
Is there an reference to the parent-object i. e.
class fruits {
var $location = "in the fridge";
}
class apples extends fruits {
var $colour = "green";
var $location = "appels ". $parent->location ." as well";
}
2.) Tree stucture of object
If I have a tree structure of objects (i.e. directories) is there any reference
to the Object above (or the upper object) like ...
class file {
var $name = "dummy.txt";
var $upperdir = $upper_class->name;
}
class directory {
var $name = "myDir";
var $file = new file;
}
$dir = new directory;
echo $dir->file->upperdir // should return "myDir"
Thanx in advance
Chris
----------------------------------
E-Mail: lametta@shk.de
Date: 08-Aug-99
Time: 19:43:46
This message was sent by XFMail
----------------------------------