Re: AW: [PEAR-DEV] [PEPr] Proposal for PHP::ApplicationVars

From: Date: Thu, 01 Jan 2004 01:14:21 +0000
Subject: Re: AW: [PEAR-DEV] [PEPr] Proposal for PHP::ApplicationVars
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-24709@lists.php.net to get a copy of this message
Yeah, this is pretty much my thoughts on it.. - using Config, would seem to do the trick. I'm not sure if you can lock and serialize in Config, and use a singleton method, but thats seems about the sum of requirements for Appvars. Regards Alan Stephan Schmidt wrote:
Hi, Why do rape $_SESSION for this? AFAIK I can tell after a quick look at the code all you do is serialize some variables to a file at the end of the script and load them in the next request after instantiating PHP_ApplicationVars. This could be achieved without using the $_SESSION variable by using PEAR destructors and fopen(), fread(), fwrite() and fclose(). It could easily created driver based so you could switch to databases (or even better, shared memory). Furthermore it breaks stuff if using it together with packages or classes that use session_destroy()... Please correct me, if I got the purpose of your package wrong. Furthermore please change this: - call_user_method('_read_data',&$this); call-time pass by reference is deprecated. - return TRUE; should be return true; - function foo() { } should be function foo() { } Regards, Stephan


« previous php.pear.dev (#24709) next »