10

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?

Dreken
  • 191
  • 1
  • 7

3 Answers3

15

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

getters and setters

generate option insert code option

sunil
  • 660
  • 8
  • 20
3

first, the caret position has to be inside a PHP class and you have to press shortcut ALT+Insert (CTLRL+I on Mac). After invoking the shortcut, all possible generators are offered.

2

Place your cursor in the class, on the empty line and then hit ALT+Insert. You getter and setter options