Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24832 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89332 invoked by uid 1010); 21 Jul 2006 12:21:23 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 89317 invoked from network); 21 Jul 2006 12:21:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jul 2006 12:21:23 -0000 X-Host-Fingerprint: 195.225.34.5 fw01.axit.nl Received: from ([195.225.34.5:28946] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 91/BA-29121-1C6C0C44 for ; Fri, 21 Jul 2006 08:21:23 -0400 Message-ID: <91.BA.29121.1C6C0C44@pb1.pair.com> To: internals@lists.php.net References: <20060719173451.114d4528@pierre-u64> <20060721112422.JLUB11710.aamtaout03-winn.ispmail.ntl.com@win2ks> Date: Fri, 21 Jul 2006 14:20:49 +0200 Lines: 49 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-RFC2646: Format=Flowed; Response X-Posted-By: 195.225.34.5 Subject: Re: [PHP-DEV] Adding pecl/zip to 5.2 From: r.korving@xit.nl ("Ron Korving") Well, if they all implement some common interface, that would really be an improvement too. And I guess in that case there'd be GZipArchive, ZipArchive, RarArchive, ... classes. People have a choice then; use the specific format of their choice and have all the extras it comes with, or go for a universal approach and use the common API as defined in the interface. Still, I think options like speed/compression factor is applicable to all or most archive formats. I don't see much feature difference among formats, only in the libraries they offer perhaps (honestly, I wouldn't really know). The only difference I can think of is that gzip doesn't seem to provide a means for compression multiple files (without resorting to tar, but TGZ support could of course be developed). - Ron "Pierre" schreef in bericht news:fe05d1540607210500g734d1343rb881ba11ea93bba9@mail.gmail.com... > Hello, > > On 7/21/06, Ron Korving wrote: >> I was thinking the same thing. We can of course clutter the namespace >> with a >> class for every possible file extension we want to develop an API for, >> but >> maybe we can do the smart thing and do what PDO does for databases: >> present >> a unified API. > > I was thinking the same as well. But I don't think it is a good idea. > For the simple operations, you can do it easily in php. I don't think > there is a need for an internal implementation of such wrappers. > >> I don't like the idea of having GZip, Zip, Rar, Arj, Etc classes when >> they >> all do the same. > > They don't always do the same, that's the problem. Also I'm a fan of > one need/one tool. PDO was needed because it is really a mess in the > DB APIs. I would prefer to define some common API and have independent > extensions. It will let us implement all format specific features or > needs (which can be speed, compression level, etc.). > > Cheers, > --Pierre