PHP 5.4 Support: Traits

Posted by Ondrej Brejla on Oracle Blogs See other posts from Oracle Blogs or by Ondrej Brejla
Published on Wed, 28 Mar 2012 02:53:10 -0500 Indexed on 2012/03/28 11:35 UTC
Read the original article Hit count: 391

Filed under:

Hi all! Today we would like to intorduce you another new PHP 5.4 feature for NetBeans 7.2 which is called Traits.

Note: All PHP 5.4 features are available in your projects after setting Project Properties -> Sources -> PHP Version to PHP 5.4 value, or after choosing the same value during a PHP Project creation (in New Project Wizard).

If you don't know, what Traits are, just look at the official documentation, or RFC.

So what is that exact Trait support in NetBeans? Syntax is recognized correctly and code completion offers declared, inherited stuff from used traits.

Note: Just one thing is not supported yet - resolving name conflicts and aliasing of method names (it means that you will not have these "virtual" names in your code completion). We would like to implement it in some next NetBeans release. Sorry for any inconvenience.

PHP 5.4: Traits

That's all for today and as usual, please test it and if you find something strange, don't hesitate to file a new issue (component php, subcomponent Editor). Thanks.

© Oracle Blogs or respective owner

Related posts about /Features