Re: Re: cvs: pear /Validate Validate.php
| From: | Bertrand Mansion | Date: | Mon, 17 Feb 2003 14:04:27 +0000 |
| Subject: | Re: Re: cvs: pear /Validate Validate.php | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-13412@lists.php.net to get a copy of this message | ||
<nepto@pobox.sk> wrote :
>> mansion Mon Feb 17 05:55:15 2003 EDT
>> Modified files:
>> /pear/Validate Validate.php
>> Log:
>> Cosmetic changes, fix in phpdoc comments, changed global names.
>
>> @@ -169,16 +163,8 @@
>> * http://hysteria.sk/prielom/prielom-12.html#3
>> (Slovak language)
>> *
>> http://www.speech.cs.cmu.edu/~sburke/pub/luhn_lib.html (Perl
>> lib)
>> *
>> - * Usage:
>> - * <?php
>> - * require_once 'Validate.php';
>> - * if (Validate::creditCard('credit_card_number')) {
>> - * // Credit card number is OK
>> - * }
>> - * ?>
>> - *
>> * @param string $number number (only numeric chars will be
>> considered)
>> - * @return bool true if number is valid, otherwise false
>> + * @return bool true if number is valid, otherwise false
>> * @author Ondrej Jombik <nepto@pobox.sk>
>> */
>> function creditcard($creditcard)
>
> I do not see the point of striping all examples of usage out from source
> code. They are not neccessary for autogenerated documentation? Maybe I'm
> missing something.
>
> Method and functions names are in PHP case-insensitive. Thus I also do not
> see the point of naming method "creditcard" instead of original
> "creditCard".
As you can notice, I didn't change the function name, ask Pierre Alain Joye
for this matter. I guess this was for compatibility reasons with his
multiple() method.
About your usage example, I think it's pretty trivial, that's why I removed
it. The Validate class will probably end up with lots of methods. If
everyone starts to write such trivial examples and takes 15 lines of
comments where one is necessary, the class will take forever to load.
Regards,
Bertrand Mansion
Mamasam