I saw in NetBeans 8 refactoring functionality for automatic creation of getters and setters from class properties. It was working on Java code, but it seems that for PHP code it isn't working. Is it possible to enable this functionality or get some extension, which does that?
Position the cursor inside the class, then press ALT + Ins and select Getters and Setters from the contextual menu. – Aydin K.
In this article, we learn the best way to create getter and setter strategies in PHP. Getter and setter strategies are utilized when we need to restrict the direct access to the variables by end-users. Getters and setters are methods used to define or retrieve the values of variables, normally private ones.
Just right click in side the class body,not over the class variables and choose insert code option as shown in third image. link:http://w.planetnetbeans.org/topic28565.html
Place your cursor in the class, on the empty line and then hit ALT+Insert. You getter and setter options
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With