We need to add this php code template
Goto
Fill up the form as shown in the screenshot below.

Now in ur class file just type "gett" and then CTRL + SPACE. We now have getter/setter template for php classes inside eclipse.

I have tested this using eclipse v3.3.1.1 and phpeclipse v1.2.0.200807220603NGT
function get${field} () {
return $$this->${fieldVar};
}
function set${field} ($$${fieldVar}) {
$$this->${fieldVar} = $$${fieldVar};
}
Goto
Window > Preferences > PHPeclipse > PHP > Templates > Click NewFill up the form as shown in the screenshot below.

Now in ur class file just type "gett" and then CTRL + SPACE. We now have getter/setter template for php classes inside eclipse.

I have tested this using eclipse v3.3.1.1 and phpeclipse v1.2.0.200807220603NGT


No comments:
Post a Comment