Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SessionInterface: unset() vs remove() #60

Closed
vonalbert opened this issue Apr 7, 2016 · 1 comment
Closed

SessionInterface: unset() vs remove() #60

vonalbert opened this issue Apr 7, 2016 · 1 comment

Comments

@vonalbert
Copy link
Contributor

I noticed that the session interface defines an unset() method. I'm thinking it's not a safe name because of php's unset() (that isn't a function, but a Language construct, as reported here).
I would use another name, such remove() or delete()

@lonnieezell
Copy link
Member

I'm not concerned about the safety. Since one is a method name it shouldn't conflict, and doesn't appear to be, since that code is ripped directly from CI3.

I was getting ready to say that I had no problem changing the name, but looking back through the function names in the interface, it does make the most sense. There is already a destroy(), and delete would be a touch too close to that name for my liking. unset is the obvious opposite of set() so the naming is clear in the context. And the set/unset pairing is used throughout the Session libraries so to change one we'd have to change all of them.

At this time, I don't think this is necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants