Using a Resource as a Class Property
- From: Sanders Kaufman <bucky@xxxxxxxxxxx>
- Date: Sat, 21 Jul 2007 16:12:22 GMT
I'm wondering if I'm doing this right, as far as using another class object as a PHP class property.
class my_baseclass {
var $Database;
var $ErrorMessage;
var $TableName;
var $RecordSet;
function my_baseclass(){
$this->TableName = "";
$this->RecordSet = array();
$this->Database = new my_database();
$this->ErrorMessage = $this->Database->ErrorMessage;
return true;
}
}
It seems to be working, but this kinds stuff skirts the edge of my PHP grok, so I dunno.
.
- Follow-Ups:
- Re: Using a Resource as a Class Property
- From: Michael Fesser
- Re: Using a Resource as a Class Property
- Prev by Date: PHP slow to execute
- Next by Date: Re: insert multi rows with a single mysql function call?
- Previous by thread: PHP slow to execute
- Next by thread: Re: Using a Resource as a Class Property
- Index(es):
Relevant Pages
|