Re: cvs: pear /Validate Validate.php package.xml package_ISPN.xml /Validate/Validate ISPN.php /Validate/tests issn.php product_numbers.php

From: Date: Fri, 21 Jan 2005 02:26:11 +0000
Subject: 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 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-35659@lists.php.net to get a copy of this message
Hi Dan, > 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 :) I just had a go at this, was of course piece of cake, or well so I thought, but I had major issues with the static thing, seems that it of course will collide if I just name it all the same, thus it has to be named differently for each method, and then I got this brilliant idea of using variable variables (http://www.php.net/variables.variable for those that don't know what I mean), there's where static gave me a huge headache, it just didn't allow things to work anymore :/ I'll take another stab at this tomorrow and see if this static stuff is really needed at all by the functions that do all the math. - Helgi

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