Re: namespace separator and whining
| From: | Stanislav Malyshev | Date: | Wed, 05 Nov 2008 00:05:16 +0000 |
| Subject: | Re: namespace separator and whining | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-41678@lists.php.net to get a copy of this message | ||
Hi!
or in other words give the user the ability to specify when he wants the fallback to global and not doing a fallback to global per default. That wayThis would be quite complex thing since this way you can't be sure which class gets loaded when you say, e.g., Exception - and thus, if you write something like "throw new Exception("XML did not load")" and except My\XML\Parser\Exception and have catch for it but get just Exception your application would happily unroll to the top and fail. I think actually knowing what class is going to be loaded is a good idea and overriding loader behavior so it's asked for one class and loads completely different one is not a good idea. One would expect if he asks for class X he gets class X, not class Y. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com