hi,
I have a doubt. ¿Someone Help me? ![]()
Let’s go. I have these class:
class myclass_a(){
protected $at1;
function get_at1(){
$this->get_at1;
}
function set_at1($at1){
$this->at1=$at1;
}
}
class myclass_b extends a{
..
}
class myclass_c extends a{
..
}
In my controller:
$this->load->library(array('class_a','class_b','class_c'));
$this->class_b->set_at1('hello');
echo $this->class_b->get_at1(); //show 'hello', is correct
echo $this->class_c->get_at1(); //show empty, fail!
why the second call is empty?. I think that I have one instance of class_a. If I modify his attributes from class_b or class_c, Should not I always have the same value from get_at1() in class_a?
Thanks.
