"legacy" functions vs rolling our own |
I was updating my application to limit repeated db queries by storing more info in the session data and am wondering why functions like userdata() are marked as "legacy" in the documentation and we're being encouraged to go straight to the _SESSION variable.
This requires us to roll our own version of userdata() or write "isset($_SESSION[$key]) ? $_SESSION[$key] : NULL;" all over the place (or sub-class the session class and roll our own userdata() there). I'd be all for removing support for the NULL parameter but having a wrapper that can do basic checks and let us get on with writing our applications is one of the biggest reasons for using a framework. so, why are some of those basic wrappers around _SESSION "legacy" and presumably going away in a future version? |
Messages In This Thread |
"legacy" functions vs rolling our own - by michaelh99 - 04-12-2016, 11:26 AM
RE: "legacy" functions vs rolling our own - by Narf - 04-13-2016, 12:40 AM
|