Examining Zend Framework, I found that all setter methods (of those I’ve examined) return the instance of the class it lives in. It doesn\'t only set a value but also return
It's so that method calls on an object can be "chained", like this.
$obj -> setFoo ('foo') -> setBar ('bar') -> setBaz ('baz') -> setFarble ('farble');
The return $this allows the chaining of methods like:
return $this
$foo->bar('something')->baz()->myproperty