Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51592 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37187 invoked from network); 7 Mar 2011 09:44:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Mar 2011 09:44:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 207.97.245.153 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 207.97.245.153 smtp153.iad.emailsrvr.com Linux 2.6 Received: from [207.97.245.153] ([207.97.245.153:59713] helo=smtp153.iad.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F0/83-17187-109A47D4 for ; Mon, 07 Mar 2011 04:44:34 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp55.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 330BB2E04D4; Mon, 7 Mar 2011 04:44:31 -0500 (EST) X-Virus-Scanned: OK Received: by smtp55.relay.iad1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 7740A2E04C9; Mon, 7 Mar 2011 04:44:30 -0500 (EST) Message-ID: <4D74A8FD.3020102@sugarcrm.com> Date: Mon, 07 Mar 2011 01:44:29 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.14) Gecko/20110221 Thunderbird/3.1.8 MIME-Version: 1.0 To: Pierre Joye CC: Gustavo Lopes , "internals@lists.php.net" References: <4D7431C3.10405@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] file streams & metadata From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > I would prefer to have these particular getters (and maybe ever > setters) somewhere else, like in a derivated SplFile. That would give > us more flexibility and cleaner APIs fro something that does not > really fit in default streams anyway (or rarely). touch(), chmod(), etc. aren't "rarely" used. They are used in alomst any app, everywhere. Right now every file wrapper - such as vfsStream mentioned before - is useless for transparent wrapping of the filesystem, since it can not cover these functions. And if you do an extension wrapping streams, you have to manually override these, which sucks big time, since it goes against the whole idea of streams abstraction. That means you can't test it, you can't use it for abstraction, nothing. Adding these functions into SplFile solves nothing - the whole point of streams is that they work with usual file functions, not require some separate class. If I needed separate class with its own functions, I won't be needing streams. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227