[PEPr] Comment on Images::JpegMarkerReader

From: Date: Wed, 21 May 2008 18:11:44 +0000
Subject: [PEPr] Comment on Images::JpegMarkerReader
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-50147@lists.php.net to get a copy of this message
Chuck Burgess (http://pear.php.net/user/ashnazg) has commented on the proposal for Images::JpegMarkerReader. Comment: Nice compact API, and no external dependencies that I can see, so a light package :) I'd probably change eof() and damaged() to isEof() and isDamaged()... I tend to use this convention for readability of such boolean checker methods. You'll probably also want to look at returning exceptions rather than "false" on failures. This way it will fit itself into the PEAR architecture. You'll want to write your own JpegMarkerReaderException class that extends PEAR_Exception, even if you don't add anything new to your child exception. Probably though, you'll want to customize new child exceptions from your parent exception, to highlight more specific exception reasons (e.g. an "unable to open file" exception). Last thing would be that if there's a published spec online somewhere that you based this on, include that link as an @link or @see tag in the class docblock. That can help with future maintenance, if/when your package attracts new developers to help with it. Proposal information: http://pear.php.net/pepr/pepr-proposal-show.php?id=559 -- Sent by PEPr, the automatic proposal system at http://pear.php.net

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