Feature #9628
Setter chaining in domain model
| Status: | Resolved | Start date: | 2010-09-07 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | Sebastian Michaelsen | % Done: | 0% |
|
| Category: | Code Creation | |||
| Target version: | 0.1 | |||
| Votes: | 0 |
Description
I find setter chaining something handy and convenient. Since the generated setters have no return value, it would be easy to add one. The patch below adds a return $this; line to every setter and the right doc block comments.
It simply changes eg.:
/**
* Setter for somevalue
*
* @param string $somevalue somevalue
* @return void
*/
public function setSomevalue($somevalue) {
$this->somevalue = $somevalue;
}
to
/**
* Setter for somevalue
*
* @param string $somevalue somevalue
* @return Tx_Someext_Domain_Model_Somemodel
*/
public function setSomevalue($somevalue) {
$this->somevalue = $somevalue;
return $this;
}
History
Updated by Sebastian Michaelsen over 2 years ago
- Status changed from New to Accepted
- Priority changed from Could have to Should have
- Target version set to 0.1
Updated by Rens Admiraal over 2 years ago
- Status changed from Accepted to Resolved
Solved in current trunk