On Wed, 4 Jul 2007, Alexandru Stanoi wrote:

> Flexibility is the key here, so I propose this:
> 
> validateEmailAddress - just regexp
> verifyDomain - just checkdnsrr() or exec( 'nslookup' ) on Windows
> convertToPunyCode - converts to Punycode
> convertToUnicode - viceversa
> 
> and it will be up to the developer to use these functions as he sees fit.

Yes, this idea sounds fine, but we need more descriptive method names. I 
would also make the rx checks as option to validateEmailAddress 
actually, as it's the same function and that shouldn't be done by two 
methods. I think that we should also see if we can do more than just 
"checkdnsrr()" (you mentioned some more advanced algorithm).

The last two functions "convertToPunyCode" and "convertToUnicode" do 
actually not really belong in the Mail component at all, as they are 
generic methods. I think they actually belong more in Url. I would 
therefore suggest to create two methods on ezcUrl (and the algorithms it 
self in ezcUrlTools as static methods) that can convert a Url toASCII()
(with the punycode algorithms) and toUnicode() with the reverse 
algorithm. (I am naming them toASCII() and toUnicode() here because 
that's what wikipedia suggests). 

regards,
Derick

-- 
Derick Rethans
eZ components Product Manager
eZ systems | http://ez.no
-- 
Components mailing list
Components@lists.ez.no
http://lists.ez.no/mailman/listinfo/components

Reply via email to