Hi
Can someone tell me how can i do the following.
There is two class
One:
Class One {
var $objects; // this array will contains the outside objects
function One() {
...
}
function insert( &$obj ) {
$this->objects[ $obj->name ] = $obj;
}
function set_object( $name ) {
$obj = $this->object[ $name ];
$obj->value = 1000;
}
}
Two:
class Two {
var $value;
var $name;
function Two( $name ) {
$this->name = $name;
}
}
This is the main:
$main = new One();
$outside = new Two("xxx");
$main->insert( $outside );
.
.
$main->set_object( "xxx" );
.
.
.
Here is my problem:
The set_object methods produce a new local $obj variable, contains all of the $outside object's properties...but i can't set the "main" $outside variable properties.
Please help me, before i format my hdd.
Thanks