From: Jackson M. <ja...@ph...> - 2004-12-11 23:22:21
|
I have been playing with a CEP_User object cached in the session. It is working pretty well but I still have some bugs to fix before I am going to commit the implementation to CVS. One "problem" I have come up against is that in order to cache objects in the session, they must be available before session_start() is called. This won't work if session_autostart is turned on in the ini file. I don't know the performance implications of having to call session_start, but I think that would be less than ideal. The other options would be: Defining an __autoload method for CEP. This would be global for all PHP run during the CEP request, which would limit the ability to incorporate third party packages that also use autoload. However, we will need autoload anyway once we start doing the "aspect" part of CLAMs. The final option would be to provide CEP_User as a PECL compiled class and put that in PHP.ini with session_autostart. I think this option completely sucks too. I think that autoload is the best option, and it probably wouldn't be a problem at all if we had namespaces, but ... Thoughts? -Jackson |