Re: [Phplib-users] php4 session fix, and some thoughts
Brought to you by:
nhruby,
richardarcher
From: Lindsay H. <fmo...@fm...> - 2003-01-24 23:33:45
|
Thus spake Giancarlo on Fri, Jan 24, 2003 at 04:13:25PM CST > >>This would probably work (although I haven't tested it either). I think > >>it > >>would be more scalable to make keeping track of session business the > >>responsibility of the Session class rather than the effective constructor > >>for the Page class, but if we're going this route, and $sess->in is to be > >>depreciated, the above code could be simplified further still. > >> > > But why should it be deprecated! The fist time $sess->inis taken from > the code, from the included source. And from that moment on it will hang > onto another presistent variable, extra to the $sess object. And this > last persistent var will anyway set the $sess->in value, and it will be > transparent. And not deprecated. To quote Spock, "this is logical". As far as I'm concerned, there's no reason to depreciate $sess->in. It was Maxim Derkachev who suggested that both $sess->in and the documented behavior of auto_init were going to go away. I see no reason at all to eliminate anything in the published phplib API unless it's absolutely necessary, for technical reasons, to do so. I can run a .COM file on a MS Windows box (the old < 64K executable format) and the memory image of the program still contains a 256 byte Program Segment Prefix with all the same stuff in it that was included when we were using 8 bit computers with CP/M back in the late 70's and early 80's. It's generally useless, but the cost is minimal and it was left there to insure upward compatibility of these old programs. The published API for any platform should get broken only in cases of absolute technical necessity, and then it's done at the peril of the platform itself. -- Lindsay Haisley | "Everything works | PGP public key FMP Computer Services | if you let it" | available at 512-259-1190 | (The Roadie) | <http://www.fmp.com/pubkeys> http://www.fmp.com | | |