Vardoc for $this inside view file |
Site Admin
|
Indeed, $this is handled as a special case, the case with known class -- the class in the scope.
In the hand, I see no reason why PHPDOC would be ignored for $this, so we'll implement this in 6112 and the following declaration will work starting with this build:
Please note, that even though you can call succeessor code by "overriding" or casting class of $this, it certainly violates OOP practice. For example, suppose we have a class A and another class B inherited from A. If you write a method in class B, you can call any other method in B and in A. This is okay. But you can not and should not call any method of B in A's method. Same goes to the properties. These rules are followed automatically by PhpED code completion. With this case it will allow calling A and B from B, and won't list B's methods while coding A. You don't need any PHPDOC typehints to make it working in this way. |
||||||||||||||
_________________ The PHP IDE team |
Code Insight challenge for PHP5.3 |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by