Re: OOP slow -- am I an idiot?

From: Date: Fri, 13 Oct 2006 08:27:32 +0000
Subject: Re: OOP slow -- am I an idiot?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-243080@lists.php.net to get a copy of this message
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

« previous php.general (#243080) next »