Re: cvs: pear /Validate/Validate US.php

From: Date: Thu, 20 Jun 2002 01:51:27 +0000
Subject: Re: cvs: pear /Validate/Validate US.php
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-7219@lists.php.net to get a copy of this message
Tomas V.V.Cox wrote:
Please do not include the File dependency for the class for doing such little work, makes no sense. Also take in mind that Validate methods are really static functions and should be used in the same way normal PHP functions works (return bool and trigger an error on internal error). Prepend the "@" operator if you don't want to show the error). IMHO this path should be reverted.
No. a) static or not, the PEAR user expect a PEAR_Error in case of failure, if this behavoir isn't constant, we lost one of the importest PEAR features b) if the user uses PEAR, he know that he can not get the best performance - else he would use a customized function c) PEAR functions are not PHP functions d) you can expect a user knowing PEAR doesn't use only this validition function, so PEAR.php is already include in the most cases of hugher applications e) Using raiseError will make your life easier, if you start to migrate the PEAR stuff to PHP 5 and using the try-catch-mechanism.

« previous php.pear.dev (#7219) next »