Re: Order of class resolution with namespaces and autoload

From: Date: Sun, 21 Oct 2007 06:18:14 +0000
Subject: Re: Order of class resolution with namespaces and autoload
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-32899@lists.php.net to get a copy of this message
builtin classes is feasible, but if it is, then the simple, "put global classes into my namespace" ("register_globals" ;) option is: namespace Test; import PHP;
"import PHP" is a no-op now. However, I have another idea about it (besides the fix for the import thing that indeed looks like a bug to me) - what if we add some syntax to say "use this namespace" which would use autoload, so you'd say: namespace Test; throw new this::Exception(); and it would mean Test::Exception (including autoloading). Without concentrating on 'this' name (we may have another, better name for that) would it make things better? -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

« previous php.internals (#32899) next »