Greetings programmers,
I was wondering if there is a possibility to change the behaviour of getter/setter generation in php module. At the moment it works like this:
class A
{
private $field;
}
Now I will generate setter by pressing alt+ins and selecting “Setter…” resulting in:
class A
{
private $field;
public function setField($field)
{
$this->field = $field;
}
}
Is there a possibility to change the behaviour that it would generate something differnet, lets say this:
class A
{
private $field;
public function setField($field)
{
$this->field = $field;
return $this;
}
}
The difference is at the returh $this row.
I ran into this old question while searching for ways to adjust the template used for setter/getter generation in netbeans.
Since this question is left unanswered, ill leave a pointer to a similar question: How to edit getter & setter templates in NetBeans?
Basically the answer is: No, you can not change the template of the setter/getter generator in netbeans. Atleast not unless you are willing to patch the Netbeans sourcecode.