Re: Re: cvs: pear /Validate Validate.php package.xml package_ISPN.xml /Validate/Validate ISPN.php /Validate/tests issn.php product_numbers.php
| From: | Helgi Þormar | Date: | Fri, 21 Jan 2005 01:32:05 +0000 |
| Subject: | Re: Re: cvs: pear /Validate Validate.php package.xml package_ISPN.xml /Validate/Validate ISPN.php /Validate/tests issn.php product_numbers.php | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-35658@lists.php.net to get a copy of this message | ||
On Fri, 2005-01-21 at 01:14, Daniel Convissor wrote:
> Hi:
>
> On Thu, Jan 20, 2005 at 03:18:33PM -0000, Helgi ormar orbjrnsson wrote:
> > dufuz Thu Jan 20 10:18:33 2005 EDT
> >
> > - Splitted these functions over to a new sub package called Validate_ISPN (International
> > Standard Product Numbers)
> > * ISSN
> > * ISBN
> > * ISMN
> > * EAN8
> > * EAN13
> > * EAN14
> > * UCC12
> > * SSCC
>
> Considering EAN 13 and 14 (plus I assume 8, and perhaps some other items
> in that list, along with UPC codes) are all the same thing, beside having
> a different number of digits, and on top of that, in store settings it is
> common to get different codes all the time, does the package have one
> method that can process any length code?
>
> Thanks,
Recommend you look at the code and also look at the links given on each
function, I didn't tho write this, only looked briefly on those web
pages to understand a little better what I was writing tests for, but
yes you are right, SSCC and all those EAN UCC functions are the same
except for that one thing, and I could make a abstraction function which
takes in the input, does the replacing, checks the length, does static
on the right array (well I'd just have X long array and cut it down
after needs), but well I'll see about if I'll do that before the release
tomorrow.
Thanks for the heads up, hadn't been paying much attention to that part
of the Validate class :)
> --Dan
>
> PS: "Split" is both present and past tense.
My bad, seems tho that I used split in most cases :-)
Thanks.
- Helgi