Inheritance question
| From: | Craig Hoffman | Date: | Mon, 19 Mar 2007 20:03:05 +0000 |
| Subject: | Inheritance question | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-43306@lists.php.net to get a copy of this message | ||
Hi there,
I could use some help in understanding inheritance and accessing certain properties in objects.
For example (see below), lets say I would like to use "public $one" property in a new class / method (such as class b)? What is the best way to accomplish this? Any help and or suggestions are welcome.
class a {
public $one;
public function someMethod() {
$this->one = '1';
}
}
class b {
public $two
function someOtherMethod() {
$this->two = '2';
}
}
- CH