Sessions and Classes
| From: | Chris Kovalcik | Date: | Tue, 22 May 2001 20:33:59 +0000 |
| Subject: | Sessions and Classes | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-53919@lists.php.net to get a copy of this message | ||
Hi,
Can a class be stored as a session variable?
If not, what advantage is there to using classes in php?
I kind of see classes as used for things that will be frequently accessed/stored in memory, but with
php(web) the code is basically executed once with nothing remaining in memory. Seems kind of a pain
to create a class, initialize the class and work with it all for a single execution, or am I missing
something?
EX: I create a customer class, then I have to fill in all the member variables, etc. But I would
have to store all the info in a DB anyways, so what point is there to the class if I just need to
update the DB. I can see a class for the DB access it self, to make it easier to change to other
DB's, but not for a customer.
Chris