array method attributes (OO)
| From: | Ben Edwards | Date: | Fri, 08 Aug 2003 13:17:43 +0000 |
| Subject: | array method attributes (OO) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-158822@lists.php.net to get a copy of this message | ||
I wish to pass a session variable into an object and have it available as an attribute. I have what I thought I needed below as a code segment but it douse no work. Has anybody got any idea how I should achieve this.
Ben
......
class Contacts{
var $db;
array $SESSION;
function Contacts( $SESSION, $db ) {
$this->$SESSION = $SESSION;
$this->$db = $db;
}...... ****************************************************************
* Ben Edwards Tel +44 (0)1179 553 551 ICQ 42000477 ** Homepage - nothing of interest here http://gurtlush.org.uk *
* Webhosting for the masses http://www.serverone.co.uk * * Critical Site Builder http://www.criticaldistribution.com ** online collaborative web authoring content management system * * Get alt news/views films online http://www.cultureshop.org *
* i-Contact Progressive Video http://www.videonetwork.org * * Fun corporate graphics http://www.subvertise.org * * Bristol Indymedia http://bristol.indymedia.org * * Bristol's radical news http://www.bristle.org.uk *****************************************************************