简体   繁体   中英

How to generate PHP getters and setters in NetBeans?

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?

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

吸气剂和二传手

生成选项 插入代码选项

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM