RE: [PEAR-DEV] ISBN Proposal

From: Date: Fri, 05 Jan 2007 14:57:52 +0000
Subject: RE: [PEAR-DEV] ISBN Proposal
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-45434@lists.php.net to get a copy of this message
Hi, Please always CC to pear-dev@lists.php.net. Tom Klingenberg wrote: > > On Thu, 04 Jan 2007 19:43:00 +0100, Lukas Feiler > <lukas@empoweredmail.com> > wrote: > > > Hi Tom! > > > > Tom Klingenberg wrote: > >> > >> hi list, > >> > >> just uploaded a draft ISBN php class that handles validation, > >> conversion > >> (that is just in time for 2007-01-01) and the parts of an > >> ISBN for ISBN-10 > >> and ISBN-13. please let me know what you think, wanted to put > >> this under > >> open source and pear was the first repository i thought about. > >> > >> so please keep in mind, that i'm completely new to all this > >> pear code > >> submission stuff. > >> > >> tom > >> > > > > A couple of things I noticed: > > - a direct link to the source code would be nice (i.e. to a > phps file) > try http://www.lastflood.com/de/docs/ISBN.phps.php That should be added to the proposal. > > > - use single quotes (') instead of double quotes (") > well, i might do so, but please refer to: > http://pear.php.net/manual/en/standards.bestpractices.php You are right but please consider that double quotes will make your code run slower (mostly because of the variable parsing involved). I think the use of single quotes can be considered a best practice in PEAR. > > > - write your own exception class that extends > PEAR_Exception and throw > > that > No, this is a php5 package, please refer to: > http://pear.php.net/manual/en/standars.errors.php http://pear.php.net/manual/en/standars.errors.php#AEN1320 states (regarding PHP5 packages): "[...] each PEAR package must provide a top level exception, named <Package_Name>_Exception. It is considered best practice that the package never throws exceptions that aren't descendant from its top level exception." > > > - IMHO most of the functionality provided by your package > could go into > > Validate_ISPN; have you talked to the maintainers of Validate_ISPN? > > as an answer to that question, please check the answer to > phillipe i just > send to the mailinglist, i wrote about the differences there. mainly > Validate_ISPN is about validating an ISPN (inkl. ISBN); ISBN > contains > validation of an ISBN as well but that is the only intersection. That's not really my call; let's see what the maintainers of Validate_ISPN have to say. > > > > > Cheers, > > Lukas > > happy new year lukas! > Happy new year to you too! Lukas

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