Welcome! Log In Create A New Profile

Advanced

[PHP-DEV] Re: Namespace resolution rules has been changed?

Posted by David Grudl 
David Grudl
[PHP-DEV] Re: Namespace resolution rules has been changed?
November 17, 2008 11:55AM
> true, however i have a counter example: classes from more general namespace
> that use further nested classes (think some kind of behaviour and different
> drivers/plugins for example).

> so while it's true that more nested classes usually extend the less nested
> ones it also common for more generic code to use it's namespace descendants.
> in sutch condition possibility to use just the remaining namespace part is a
> big help and i'd say it's usage would be more comon than single "extends" at
> class definition where you're obligated to supply FQN [1].

The more generic code (i.e. application code) is located usually in its own namespace, so it must use FQN. FQN with leading backslash.

DG.


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Sorry, only registered users may post in this forum.

Click here to login