Re: OOP slow -- am I an idiot?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please include the list when replying to that others may benefit (or suffer) from the discussion.

Bruce Cowin wrote:
I like your static user class.  Does the user instance then get saved to a session variable that is serialized/unserialized on every page?

There is no user instance as such. In that simple case the only thing stored is an array of allowable actions. If I were to extend it to more complex user system I would likely convert the User class to non-static and store an instance of that in the session. I would then have a static method called Current() to return the static instance.

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux