Re: SessionManager

From: Date: Wed, 27 Jun 2001 14:14:32 +0000
Subject: Re: SessionManager
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-500@lists.php.net to get a copy of this message
On Wed, Jun 27, 2001 at 03:57:28PM +0200, Hans Westerbeek wrote: > > How would its methods differ from the standard session_* > > functions? > > There's nothing in there that you can't do by using the > primitive functions yourself.... But: the value (to me) is the > fact that it can be used in other (future) PEAR-components. > Aren't sessions a vital PHP-functionality? Vital > functionalities should be used in the same fashion as much as > possible, i.e. with a wrapper class. I don't agree with you here. Future PEAR components can just use the native session_* functions without incuring the overhead of calling class methods. I don't see what you're gaining between this: session_name('session_name'); session_start(); session_register('foo'); session_unregister('foo'); session_destoy('session_name'); ... and ... $session = new Session('session_name'); $session->start(); $session->register('foo'); $session->unregister('foo'); $session->destory(); > In the end that wrapper class will be bug-free, saving the developer of a > new Pear component that requires sessions a lot of work... Are you inferring that wrapping the existing functions in a class are going to improve the quality of those functions? Aside from some addtional type checking, I don't know how you could really improve upon them. -- Jon Parise (jon@csh.rit.edu) . Rochester Inst. of Technology http://www.csh.rit.edu/~jon/ : Computer Science House Member

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