title: Why return $this in setter methods?
body: <p>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 returns <code>$this</code>. For example:</p>
  
  <pre><code>  /*   Zend_Controller_Router   */
  public function setGlobalParam($name, $value) {
      $this-&gt;_globalParams[$name] = $value;
      return $this;
  }
  
    /*    Zend_Controller_Request    */
  public function setBaseUrl($baseUrl = null) {
      // ... some code here ...
      $this-&gt;_baseUrl = rtrim($baseUrl, '/');
      return $this;
  }
  
    /*    Zend_Controller_Action    */
  public function setFrontController(Zend_Controller_Front $front) {
      $this-&gt;_frontController = $front;
      return $this;
  }
  </code></pre>
  
  <p>And so on. Every public setter returns <code>$this</code>. And it's not only for setters, there are also other action methods that return <code>$this</code>:</p>
  
  <pre><code>public function addConfig(Zend_Config $config, $section = null) {
      // ... some code here ...
      return $this;
  }
  </code></pre>
  
  <p>Why is this needed? What does returning <code>$this</code> do? Does it have some special meaning?</p>