Re: PHP 4.0 Bug #5152: Object passed in a session generateserrors when member functions are called

From: Date: Thu, 22 Jun 2000 22:27:06 +0000
Subject: Re: PHP 4.0 Bug #5152: Object passed in a session generateserrors when member functions are called
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-22013@lists.php.net to get a copy of this message
> >And I repeat. My main point here was to maintain a connection between the > >class definition and the object data. That would make it possible to > >autoload them or provide user controlled loading without needing to keep > >track of which file might define which class. > > I personally understood your point and it goes against everything I have > learnt over the years especially any OOP concepts I have encountered. > Sending the class definition with the object data is wrong. Not only > because it is not done but because it is not done for a good reason. Think > about putting these monsters in databases or other storage areas. > On the other hand the idea of saving a path to the class definition is even > worse in my opinion. What if the path isn't the same on all servers > accessing the central database? Well, I did say it was a location resource and used the file:// syntax for a reason to indicate that it might be a resource that points to a database, ldap, shared memory, etc. > God, let's just for once keep it stupid simple and give the coder a bit of > credit. He can figure it out and I can assure you that most coders that > come from an OOP background won't expect the class to be sitting in their > database nor it being loaded magically from someplace on their local disk. Obviously a few do. My personal opinion is that the whole concept of serializing classes is a waste of time. But, that isn't very relevant. -Rasmus

« previous php.dev (#22013) next »