DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Make Netbeans Autogenerated PHP Getters And Setters Conform To Zend Naming Conventions

01.18.2009
| 4088 views |
  • submit to reddit
        The Netbeans PHP plugin can generate getters and setters for class variables. Unfortunately the generated method names don't conform to the Zend naming conventions. The following combination of regular expressions and BeanShell snippet can be used in jEdit to make the method names conformant    

Regular Expression
function ([gs]et)_(.)([^\(]+)

BeanShell Snippet
"function "+_1+_2.toUpperCase()+_3
    

Comments

Snippets Manager replied on Thu, 2009/08/13 - 12:11pm

Did you make this work? if so, how? Thanks