Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46460 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80335 invoked from network); 17 Dec 2009 16:19:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Dec 2009 16:19:08 -0000 Authentication-Results: pb1.pair.com smtp.mail=guilhermeblanco@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=guilhermeblanco@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.213 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: guilhermeblanco@gmail.com X-Host-Fingerprint: 209.85.218.213 mail-bw0-f213.google.com Received: from [209.85.218.213] ([209.85.218.213:64950] helo=mail-bw0-f213.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D8/BD-10317-BF95A2B4 for ; Thu, 17 Dec 2009 11:19:08 -0500 Received: by bwz5 with SMTP id 5so1588982bwz.23 for ; Thu, 17 Dec 2009 08:19:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=btMBxlEDF8pApe+ASnhv+wV/h9UiE+egBvsd9flah/E=; b=lxo0oDrFtj2UJaEMULbBKyi2qMl8+4Rd1skT/mJFUBFVcja7oukWB1HE5ep9mFu53f Cw6CMrA+S5vInLhp5de5WdC7xMg+uV0odOBS2rey9Kjni58IPG+W5BFpZn3OJdhJViX7 xIb7T90HQ0aeWp+y2UlrUYxicODVUenODSaMs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=OQJY7PeZ5j+b22k7OUd/Z4TJaIGoCBdup/81qrAoyqbMmVDHMUB90Hgurcm0pVnc7L bI4rOFngAYuGBK6uB9fz9bNa7Lj0l2T/wxrSCZyuY81IHKma4mAg98sF7o3hhkMBCr6r 6xyitenWOLxRbDXasX3VBCQD7OGyoN6WMXTsQ= MIME-Version: 1.0 Received: by 10.204.25.67 with SMTP id y3mr1392998bkb.187.1261066744518; Thu, 17 Dec 2009 08:19:04 -0800 (PST) Date: Thu, 17 Dec 2009 14:19:04 -0200 Message-ID: To: PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Possible support to DirectoryIterator to be include_path aware via flag From: guilhermeblanco@gmail.com (Guilherme Blanco) Hi guys, With new namespace inclusions, standards group releasing a common autoloader, etc, I'm felling the necessity of something. Basically, I'm suggesting to follow the same way SplFileInfo does, with a few difference. Currently, SplFileInfo is include_path aware with anything defined. DirectoryIterator is not include_path aware, and trying something like: $dirIterator =3D new DirectoryIterator('Zend/Form/Element'); Will raise an UnexpectedValueException. Looking at constructor prototype, we have this: DirectoryIterator::__construct(string $path); My suggesting is to add support to include_path just like fopen already have, which is through a flag. So the prototype would be: DirectoryIterator::__construct(string $path [, bool $include_path =3D false= ]); Possibly including the getRealPath() method too. So, what do you think? I'm just suggesting to make the support compatible between files and directories. Also, I have a special need for this feature. Cheers, --=20 Guilherme Blanco - Web Developer CBC - Certified Bindows Consultant Cell Phone: +55 (16) 9215-8480 MSN: guilhermeblanco@hotmail.com URL: http://blog.bisna.com S=C3=A3o Paulo - SP/Brazil