Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36661 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18885 invoked from network); 28 Mar 2008 18:24:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Mar 2008 18:24:47 -0000 X-Host-Fingerprint: 24.247.219.180 24-247-219-180.dhcp.cdwr.mi.charter.com Received: from [24.247.219.180] ([24.247.219.180:20247] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3F/E6-25926-FE73DE74 for ; Fri, 28 Mar 2008 13:24:47 -0500 Message-ID: <3F.E6.25926.FE73DE74@pb1.pair.com> To: internals@lists.php.net Date: Fri, 28 Mar 2008 14:24:43 -0500 User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 References: <1206719555.6331.39.camel@localhost> <07.8D.25926.CD81DE74@pb1.pair.com> <1206723693.6331.48.camel@localhost> <069801c890ff$607cf000$4001a8c0@foxbox> In-Reply-To: <069801c890ff$607cf000$4001a8c0@foxbox> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Posted-By: 24.247.219.180 Subject: Re: [PHP-DEV] phar API From: auroraeosrose@gmail.com (Elizabeth M Smith) Hiya Steph, >> Not add an empty directory - just add a directory and its contents much >> like the Phar::create would do - an assumption that you want everything >> in that directory inside with no iterators or magic required. > > Hmm.. and how would you tell the difference between: empty directory > creation, adding an existing directory plus contents, and whether the > action is recursive or not? I think this needs a bit more thought. - empty $phar->addDirectory(); - existing dir $phar->addDirectory('/path/to/directory'); Always recursive, if you don't want recursive I'd assume you're doing something fancy and need a more powerful API >> addFile(filename) would just add a file - no thinking required, although >> if there was an addDirectory you wouldn't really need it. > > I think I'm probably missing something here... (haven't read the entire > thread, can you tell?) addFile() in many cases would actually involve > more typing than we do currently via array access...? Eh, after further review an addDirectory would do it for me >> I'm just of the opinion that the less I have to write for common actions >> the better. > > Yes, I'm with you on that part. The main problem is that I don't know if > Greg would want me or Marcus to add functionality (even aliasing-type > shortcuts) this week, while we're in alpha. I rather suspect he'd like > to leave edge-smoothing for 2.1.0 and just get the thing out there and > tested ASAP, otherwise I'd be implementing everything Greg implemented > last weekend right now :-) > > We don't actually have missing functionality at this stage... everything > mentioned here boils down to 'prettification'. So while it can > definitely go down as 'wishlist' stuff, it's not actually essential. > > - Steph No one is complaining about functionality. However I think API issues are more than "prettification" and "wishlist" - maybe not alpha important but certainly beta and release - if I'm not going to be doing fancy manipulation of phars and only want a quick way to create them and run them (which is true in my case) if the pain of using the extension outweighs the benefits I won't bother (yes I am lazy) Although I do agree it doesn't have to be in the alpha, it can wait until Greg gets back - I just think a quick and easy way to do something common (create and populate a new phar quickly) would help push popularity, people are attracted to "easy" and I know I'd love phar to really succeed ;) Thanks, Elizabeth