From: "Mike Zornek" <[EMAIL PROTECTED]> > There is a column called Address in my email table, Thus I am creating a PHP > object called Email to interact with it. The Address variable of this object > will hold a string like "[EMAIL PROTECTED]". > > In the setAddress method should I check for a valid email address and throw > a warning then? And if so how? > > Or should I simply create a method isValidAddress and do the verification in > my own interface code?
Either way I would create a ValidAddress() method. I would use it as an interface, but you could also have the default action of the set() method also check it or have the validation within set() controlled by some flag. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php