[PHP] OOP-related question

2002-11-14 Thread Tularis
Hey, I have the following script: class overall { function overall(){ $this-loaded['overall'] =1; function load($class){ $$class = new $class; $this-loaded[$class] = 1; $$class-setup(); // Run constructor if(!is_object($$class)){ return false; } return true; } }

Re: [PHP] OOP-related question

2002-11-14 Thread Danny Shepherd
Hello, Adding the following as the first line of overall-load() should solve your problem. global $$class; HTH, Danny. - Original Message - From: Tularis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, November 14, 2002 8:18 PM Subject: [PHP] OOP-related question Hey, I

Re: [PHP] OOP-related question

2002-11-14 Thread Brent Baisley
I think it is working, but you are not seeing anything because all the variables and objects that are declared in your classes are destroyed once the function exits (out of scope?). I just finished reading up on this, but I think you want to look into passing data by reference instead of value

Re: [PHP] OOP-related question

2002-11-14 Thread Tularis
Message - From: Tularis To: Sent: Thursday, November 14, 2002 8:18 PM Subject: [PHP] OOP-related question Hey, I have the following script: class overall { function overall(){ $this-loaded['overall'] =1; function load($class){ $$class = new $class; $this-loaded[$class] = 1; $$class-setup

Re: [PHP] OOP-related question

2002-11-14 Thread Danny Shepherd
, Danny. - Original Message - From: Tularis To: Sent: Thursday, November 14, 2002 8:18 PM Subject: [PHP] OOP-related question Hey, I have the following script: class overall { function overall(){ $this-loaded['overall'] =1; function load($class

[PHP] OOP-related question

2002-04-29 Thread heinisch
This is done on PHP 3.0.16 Hi folks, I have a problem with these HTTP_ vars. I have a mainpage, call it main. There is an include which carries several settings and other includes like my abstract db-layer class. I include this in my class-function, which works fine for the most variables but

Re: [PHP] OOP-related question

2002-04-29 Thread Miguel Cruz
On Mon, 29 Apr 2002 [EMAIL PROTECTED] wrote: I include this in my class-function, which works fine for the most variables but $SERVER_ADDR It seems that I cannot get these variable in the function of my class so I have to pass them as argument to the function. I have made an init() function