Re: Classes userland lookup (with namespaces)

From: Date: Thu, 25 Sep 2008 20:06:05 +0000
Subject: Re: Classes userland lookup (with namespaces)
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-40691@lists.php.net to get a copy of this message
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

« previous php.internals (#40691) next »