ZF-9187: Add explanatory note as to why _Abstract, _Interface classnames are no longer valid
Description
http://framework.zend.com/manual/en/…
Add a note explaining that with future namespacing, these classes could be renamed(?) to use reserved words Interface, Abstract. (OR called as such? Not entirely familiar with namespacing plans).
Is it now the case that the last part of ANY classname must not be a reserved word?
Comments
Posted by Matthew Weier O'Phinney (matthew) on 2010-02-16T15:41:40.000+0000
Um... there's already a note saying that they could be renamed in future versions. What more do you feel needs to be added, exactly?
The reason why the last segment cannot be Abstract or Interface is that when we change the following:
to use namespaces, a literal change will leave this:
which leaves that last segment as a reserved PHP keyword, leading to parse errors. We decided simply to pre-empt this and start naming new classes appropriately in preparation for a switch to namespaces.
Posted by Dolf Schimmel (Freeaqingme) (freak) on 2010-02-16T16:36:09.000+0000
Matthew, doesn't it make sense if that is what we put in the reference guide? To people who don't know the reasoning behind this, it seems very strange that exactly at this part we deviated from the PEAR standards (this is why this issue was added for).
Posted by Richard George (parsingphase) on 2010-02-16T23:19:00.000+0000
Just a Dolf said; the "what" is specified, the "why" is not. Coders will follow the standard far more happily when they understand the reason behind it. Your explanation here would be ideal as most of us haven't played with namespaces yet.
Posted by Matthew Weier O'Phinney (matthew) on 2010-02-23T10:07:16.000+0000
Explanations added in the manual in trunk and 1.10 release branch.