Re: Session management module - thoughts

From: Date: Fri, 28 May 1999 18:31:10 +0000
Subject: Re: Session management module - thoughts
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-6199@lists.php.net to get a copy of this message
On May 28, Sascha Schumann wrote: > int session_start(string zone_path [, string CookieName [, string Id]]); I'm a little worred about the use of optional parameters here -- the problem is that to get at some of them, you're forced to deal with ones you might not want to otherwise. I think we're better off putting the zone_path and cookie_name ones into seperate little functions (ie. session_cookie_name and session_save_path -- these should return the current setting as well as taking an optional argument to set them). Some other functions to add: string session_id([string id]) -- get/set the current session id string session_encoded(int id) -- session as one big string suitable for storing someplace (and we probabaly want this to be safe for SQL queries and such, so people don't have to call addslashes() on it) array session_variables(int id) -- get the session as a big associative array register_session_loader(string function) -- register a function that takes the same arguments as session_start to implement retrieving the session data -- this is why session_id, session_cookie_name and session_save_path need to be able to return the current value as well as set them) register_session_saver(string function) -- obvious, although a better word than "saver" would be nice. :) register_session_destructor(string function) -- again, obvious session_unset(string variable) -- remove a variable from the session (this isn't just an issue of not adding it, since it may have been added on a previous page or whatever) Jim -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#6199) next »