Re: native vs. phplib sessions
| From: | Brad Pauly | Date: | Mon, 07 Apr 2003 20:12:43 +0000 |
| Subject: | Re: native vs. phplib sessions | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-142747@lists.php.net to get a copy of this message | ||
CPT John W. Holmes wrote:
You still have to include your class file, though, right? That's irrelavant, though. Your class or function or whatever can just operate on $_SESSION instead of your own variable. No difference.You are right and I really didn't do a very good job explaining what I wanted to. The benefit I was trying to illustrate was encapsulation. Although you can't have private variables currently (new in php 5), when they are available, they could be a benefit to development. I am thinking of a situation where you have an application architect that writes a framework probably with senior developers. If you encapsulate the session data, these people have full control over it. As an application is built on top of that framework (possibly by junior developers), you don't have to worry about variables being added or modified to a session that you don't want. Brad