David,

You are right, classes that don't use self might break, although there might
be a solution for this: when a class declaration is started, immediately
"import" the class. This will fix the problem, but I don't really think
it's necessary. After all, if you're using an new feature as namespaces for
your classes, shouldn't you also be using the new self:: keyword?

To answer your question, yes, "My:Nested:Namespace:Class::staticMethod()"
should work! In the test I posted in my patch post, I echo a static
variable in the class, my_ns:class2::my_static, and it works great!


--
Jessie


David Zülke wrote:

> Sounds sweet. However, I already found a problem there, it has to do with
> aliasing. Lots of code (libraries) will, even inside the same class, use
> the class name for method calls instead of the "self" keywords for various
> reasons. This will break if the user decides to alias the class and use
> it, I guess. Other than that, I don't see any problems so far. Does a
> My:Nested:Namespace:Class::staticMethod() work?
> 
> Nice work man, keep it up, let's hope we can finally have some
> namespaces/packaging support in PHP ;) I wish you luck. +1 from me.
> 
> - David
> 
> P.S: check out http://article.gmane.org/gmane.comp.php.devel/29492, might
> be of help, dunno
> 
> 

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to