Re: Re: attempting to work out conversion/compression API

From: Date: Thu, 10 Apr 2008 12:52:45 +0000
Subject: Re: Re: attempting to work out conversion/compression API
References: 1 2  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-5363@lists.php.net to get a copy of this message
Hi Steph, Am Donnerstag, den 10.04.2008, 13:46 +0100 schrieb Steph Fox: [...] > I think the main problem with this approach is that there are four > arguments > from inception, three of which are likely to be used most of the > time. > Personally I have problems remembering more than two parameters :) > especially when there are extension-specific constants involved. > > The advantage of having separate methods for > convertToTar()|convertToPhar()|convertToZip() is that it removes at least > one of those arguments, leaving only $compression, $executable and > $file_extension to worry about in the first two methods and only $executable > and $file_extension in convertToZip(). Given that most people are unlikely > to use $file_extension anyway, I think that would make it much easier to > both remember and read. So I'd rather have: And again, the problem is here is, that it exposes implementation details ("the available archive formats") to a generic user API. This is why I would heavily vote against convertTo*() methods. cu, Lars

Attachment: [application/pgp-signature] Dies ist ein digital signierter Nachrichtenteil signature.asc
« previous php.pecl.dev (#5363) next »