AW: [PEAR-DEV] [PEPr] Proposal for PHP::ApplicationVars
| From: | Stephan Schmidt | Date: | Wed, 31 Dec 2003 16:06:16 +0000 |
| Subject: | AW: [PEAR-DEV] [PEPr] Proposal for PHP::ApplicationVars | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-24691@lists.php.net to get a copy of this message | ||
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