Class question

From: Date: Fri, 15 Sep 2006 09:01:01 +0000
Subject: Class question
Groups: php.general 
Request: Send a blank email to php-general+get-241812@lists.php.net to get a copy of this message
I have 3 classes, CLASS A,B and C class A {
         var $some_var;
          var $class_B;
         function A(){
               $this->class_B = new B();
               $this->some_var=2;
         }
} class B {
         var $some_var;
          var $class_C;
         function B(){
               $this->class_C = new C();
               $this->some_var= some_var_from_class_A;
         }
} class C {
         var $some_var;
                 function C(){
               $this->some_var= some_var_from_class_A;
         }
} How can class B and C get the value of $some_var_class_A without using "$this->class_B = new B($some_var);" roger helgesen

« previous php.general (#241812) next »