jump to navigation

Generate Accessors and Mutators Automatically with PDT November 22, 2011

Posted by Tournas Dimitrios in PHP.

I recently discovered the PHP Source Plugin for PDT , which  auto-generate accessors and mutators (also called getters and setters) in classes . With a simple menu click , a dialog box  lists all  properties of curent selected class and with a couple more clicks , we can specify wich of those properties should have accessors and/or mutators , and then the plugin  creates the code . All we have to do is go in and add validation code and PHPDOC comments , and we can move on to the next class . This is going to be a HUGE time saver .

PHP Source Plugin is published by E-surf . Although the plugin is listed in ” Eclipse’s Marketplace” graphical installation panel as PHP-Source-PLugin (Help -> Marketplace ) , it can’t be installed .  I made the installation through the graphical “New Software Installation” panel  : ” Help -> Install new Software ” , from the following link –>  http://pdt.plugins.e-surf.pl/updates  . After the installation of the plugin a menu-button ” PHP Source” will call a panel where we can define which properties of current selected Class will be included in the list for auto-generate accessors and mutators .



No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s