Use the Eclipse PDT PHPClassGenerator plugin by IBM to generate automatically classes and accessors: automatic but maybe to complex to configure and use. And it can’t generate getters / setters for attributes that have been added after the class creation.

Humpf… At the moment, their is no perfect solution, and it is a shame! In Java, a simple right clic on a class > Source > Generate get/set or Generate toString… That is why developing in PHP on Eclipse is not yet as easy as developing in Java.