Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40691 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59068 invoked from network); 25 Sep 2008 20:06:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Sep 2008 20:06:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=mark@hell.ne.jp; spf=fail; sender-id=fail Authentication-Results: pb1.pair.com header.from=mark@hell.ne.jp; sender-id=fail Received-SPF: fail (pb1.pair.com: domain hell.ne.jp does not designate 91.121.140.141 as permitted sender) X-PHP-List-Original-Sender: mark@hell.ne.jp X-Host-Fingerprint: 91.121.140.141 shigoto.ookoo.org Linux 2.6 Received: from [91.121.140.141] ([91.121.140.141:50776] helo=Shigoto.ookoo.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 43/F6-19781-53FEBD84 for ; Thu, 25 Sep 2008 16:06:13 -0400 Received: (pmaild 636118 invoked for user karpeles@ookoo.org); Thu, 25 Sep 2008 22:06:06 +0200 Received: from [192.168.0.25] (30.3.207-77.rev.gaoland.net [77.207.3.30]) by Shigoto.ookoo.org (phpinetd by MagicalTux ) with SMTP version 1.0; Thu, 25 Sep 2008 22:06:06 +0200 To: 'PHP Internals' In-Reply-To: <1222320377.1712.169.camel@localhost> References: <1222320377.1712.169.camel@localhost> Content-Type: text/plain; charset=UTF-8 Date: Thu, 25 Sep 2008 22:06:05 +0200 Message-ID: <1222373165.1712.179.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Classes userland lookup (with namespaces) From: mark@hell.ne.jp (Mark) And just to answer to myself, here's a sample implementation of the __resolve() magic function. It's missing its second and third parameters and is still far from the final goal of this implementation, but at least it allows me to demonstrate a bit how this works. For example uses & interest, please see my mail from Thu, 25 Sep 2008 07:26:17 +0200. Patch against PHP 5.3.0alpha2: http://ookoo.org/svn/snip/php-5.3.0alpha2_resolve_class.patch Example of something which became possible (it just demonstrates that the whole thing works): http://ookoo.org/svn/snip/resolver_test.php Now I'll try to find out how I'll get the two last arguments (current namespace and use list) and try to make a proper patch out of this so it may have chances (?) to be looked at. The patch url points to a SVN and the file will be updated as soon as I improve the code. The name of the magic function isn't defined either, I guess calling it __resolveclass() would be better than __resolve(), but I was hoping to get some answers from the list. Mark Le jeudi 25 septembre 2008 à 07:26 +0200, Mark a écrit : > Hi, [...] > > Best regards, > Mark Karpeles