Re: Missing __toString() part

From: Date: Mon, 05 Jun 2006 00:33:28 +0000
Subject: Re: Missing __toString() part
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-23948@lists.php.net to get a copy of this message
On 6/5/06, Adam Maccabee Trachtenberg <adam@trachtenberg.com> wrote:
For example, for an eBay Item object, my __toString() returns the Title, but that's not unique, so my __toHash() returns the numeric ID, which is.
While I wouldn't be surprised if you completely ignore my opinion, however I think the __toHash implementation should happen in an interface, rather than happening automagically. That will make it just a little bit more predicatable. Michael

« previous php.internals (#23948) next »