Re: Re[2]: [PEAR-DEV] Package Proposal: Payment_DTA, SOURCECODE
| From: | Stefan Neufeind | Date: | Wed, 20 Aug 2003 14:13:53 +0000 |
| Subject: | Re: Re[2]: [PEAR-DEV] Package Proposal: Payment_DTA, SOURCECODE | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-20159@lists.php.net to get a copy of this message | ||
On 20 Aug 2003 at 15:59, Derick Rethans wrote:
> On Wed, 20 Aug 2003, Web-Gear wrote:
>
> > Hi!
> >
> > I'm pleased that this package seems to be a good thing perhaps.
> >
> > You can find the sourcecode here:
> >
> > http://www.web-gear.com/test/dta/Dta.php.txt
> >
> > Please note that this is my first time I make sourcecode of me
> > public, so don't judge to hard :-). Each advice is welcome!
>
> Instead of this:
> $this->validString_chars = array(32, 36, 37, 38, 42, 43, 44, 45, 46,
> 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70,
> 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
> 88, 89, 90, 196, 214, 220, 223);
>
> I would do something as this:
> $string = " $%&*+,-./0123456789 etc.
> and then do a one-char split on that. Makes it much better readable
> IMO.
Maybe stat could be moved from the constructor into a constant also?
And maybe regex for char-validation would be a nice idea?
Stefan