title: Download files with zend contextSwitch() Action Helper
body: <p>everybody. I'm stack with similar thing: i have to provide a download file capability with Zend Framework... Several hours of googling don't help me with this... 
  So here is my Controller code (note: i'm a beginner):</p>
  
  <pre><code>//callback
  public function sendFile()
  {
      readfile(APPLICATION_PATH . "/../public/pdf/10.pdf");
  }
  
  public function init()
  {
      $this-&gt;_helper-&gt;contextSwitch()
              -&gt;addContext('file', array(
                    'headers' =&gt; array(
                        'Content-Type'          =&gt; 'application/pdf',
                        'Content-disposition'   =&gt; 'attachment; filename="10.pdf"'),
                    'callbacks' =&gt; array(
                        'init'  =&gt; '_sendFile'
                    )
                ))
              -&gt;addActionContext('download', 'file')
              -&gt;setAutoJsonSerialization(false)
              -&gt;initContext();
  
  }
  // ...
  public function downloadAction()
  {
  }
  </code></pre>
  
  <p>PS: I find this <a href="http://www.stoimen.com/blog/2010/05/25/download-files-with-zend-framework/" rel="nofollow">download files with zend framework</a> but i want to do this Zend way.
  Thank you all</p>