Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36656 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89017 invoked from network); 28 Mar 2008 17:01:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Mar 2008 17:01:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=lars@strojny.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=lars@strojny.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain strojny.net designates 85.10.204.248 as permitted sender) X-PHP-List-Original-Sender: lars@strojny.net X-Host-Fingerprint: 85.10.204.248 milch.schokokeks.org Received: from [85.10.204.248] ([85.10.204.248:51675] helo=milch.schokokeks.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C1/01-25926-0742DE74 for ; Fri, 28 Mar 2008 12:01:38 -0500 Received: from [10.22.2.150] (colt-d53d2146.colt.mediaventures.de [::ffff:213.61.33.70]) (AUTH: PLAIN lars@schokokeks.org, SSL: TLSv1/SSLv3,256bits,CAMELLIA256-SHA) by milch.schokokeks.org with esmtp; Fri, 28 Mar 2008 18:01:34 +0100 id 0000000000020007.0000000047ED246E.00000373 To: Elizabeth M Smith Cc: internals@lists.php.net In-Reply-To: <07.8D.25926.CD81DE74@pb1.pair.com> References: <1206719555.6331.39.camel@localhost> <07.8D.25926.CD81DE74@pb1.pair.com> Date: Fri, 28 Mar 2008 18:01:33 +0100 Message-ID: <1206723693.6331.48.camel@localhost> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=_milch.schokokeks.org-883-1206723694-0001-2" X-Mailer: Evolution 2.22.0 Subject: Re: [PHP-DEV] phar API From: lars@strojny.net (Lars Strojny) --=_milch.schokokeks.org-883-1206723694-0001-2 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Elizabeth, Am Freitag, den 28.03.2008, 12:12 -0500 schrieb Elizabeth M Smith: [...] > I'd vote for Phar::canWrite() && is_writable('test.phar') - so you know > if you actually can change the phar. OK, fine. That's how I have it in the proposal too, and Marcus already stated his preference the same way. [...] > After looking over the rfc - the phar as a multidimensional array, the > isWriteable, the createDirectory and the Phar::create would solve most > of my current API gripes for phar - the rest...I don't know what > rewriting all the splfileobject and splfileinfo methods would achieve... PharFileInfo is derived from SplFileInfo. Therefore adding setContent()/getContent() to SplFileInfo would allow doing setContent()/getContent() with PharFileInfo. Phar is derived from DirectoryIterator and DirectoryIterator allows to set the info class (setInfoClass(), the info class must be derived from SplFileInfo). SplFileObject is derived from SplFileInfo, therefore renaming the would make the usage of SplFileObject more straighforward, if a user does the following: $phar =3D new Phar("test.phar"); $phar->setInfoClass('SplFileObject'); $file =3D $phar['file']; // File would be an instance of SplFileObject > The only things I see missing are an addFile and addDirectory shortcut > methods for when I don't want to mess with all the metadata or creating > iterators. addDirectory() is called createDirectory() in my RFC, just ignore the return value. What would you like addFile() to do? Adding an empty file? cu, Lars --=_milch.schokokeks.org-883-1206723694-0001-2 Content-Type: application/pgp-signature; name="signature.asc" Content-Transfer-Encoding: 7bit Content-Description: Dies ist ein digital signierter Nachrichtenteil -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (GNU/Linux) iQIcBAABAgAGBQJH7SRtAAoJECQPF+sCY6wHTA0P/jhcU/GtNMbcmedUrGX/blev kKCJBL3tTzikhDp374fPRDP8aMw7gpMxmXW/SmX3TAXr93JYbZKo9K4dDXbdSb12 tkTs++i5wtaf5xxeRU8LKa+klO9POHV5PIuJHT2H6epEZW30H1WYeW5Ct77CSPwS Mr5PckihBEFjzIEClYHK9JKYFw5y0oQwnEBlZ7KBlWtUAzEsVastZVs+KOlNhJef Qrx0cdkvrQxbeAMrxxEwlEAHL103IpJJ6iKUHn+AWNTLdZBbR189vVql10SdM+Py Kd7+2MMrRTja7Sj4NFHSITFV/D57JCYfJiryhwAj07A4BEP5HmkgXMebzHaIp6Bq Q/gbM6XZlsRgBJ+hquQx4mBbsziDxQa9xA9CUjj95cRxqKY+6arJbIE+7q/8cngO fIzBZ6PDxfel/LBSg1syc+GI7BO8INFcR8Ck2ax0ID/cSuw7TBE+a2VLifManNPX 3YyqpMD+/D38eZNEv4ymUaGpp7rR5UDRywy1t9QcQQvTt8uA8pwTIawJ0mLlLjo7 hdSSACnL6Nk1LI46dozwYmyoy6OwXIs3gHLJEU3ZzQULuINTE/885oVhS/lJjR7w f7EK6kqX7PQnazcbmsTwWSaujOpBQVEweZZyeQ3UHj0zDUSuvWejlzr2FyVyAhuB 9UIzRgHxnXn2MX6SeekK =avD8 -----END PGP SIGNATURE----- --=_milch.schokokeks.org-883-1206723694-0001-2--