Re: Removing base class from session handler

From: Date: Fri, 23 Jan 2015 06:47:19 +0000
Subject: Re: Removing base class from session handler
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-81027@lists.php.net to get a copy of this message
Hi! > User may extend SessionHandler class like > > class MySession extends SessionHandler {} > > but user cannot extend base class(SessionHandler) capability because > user script > cannot access to PS(mod_data). Not sure what you mean by that. Absence of access to PS(mod_data) certainly doesn't mean the user can not extend it's function, e.g. the manual demonstrates EncryptedSessionHandler - is there something wrong with that? Of course, there can be many more examples of it. > I should have written "remove the SessionHandler class". As I wrote, > user may > extend SessionHandler class. I don't think this is a good idea. There are valid uses of this, and there's code using it. Removing it does not achieve any goal as far as I can see. > However, defining user session class as > class MySession extends SessionHandler {} > have no merit. Users must implement required methods to be useful. I'm not sure why you say that - if they don't implement any methods, wouldn't that class work exactly as the native handler? Isn't the native handler useful? -- Stas Malyshev smalyshev@gmail.com

« previous php.internals (#81027) next »