library/Garp/Controller/Helper/Download.php
public function force($bytes, $filename, Zend_Controller_Response_Abstract $response) {
        if (!strlen($bytes)) {
            $response->setBody('Sorry, we could not find the requested file.');
        } else {
            // Disable view and layout rendering
            Zend_Controller_Action_HelperBroker::getExistingHelper('viewRenderer')->setNoRender();
            Zend_Controller_Action_HelperBroker::getExistingHelper('layout')->disableLayout();
            
            // Process the download
            $this->_setHeaders($bytes, $filename, $response);
            $response->setBody($bytes);
        }
    }
public function force($bytes, $filename, Zend_Controller_Response_Abstract $response) {
        if (!strlen($bytes)) {
            $response->setBody('Sorry, we could not find the requested file.');
        } else {
            // Disable view and layout rendering
            Zend_Controller_Action_HelperBroker::getExistingHelper('viewRenderer')->setNoRender();
            Zend_Controller_Action_HelperBroker::getExistingHelper('layout')->disableLayout();
            
            // Process the download
            $this->_setHeaders($bytes, $filename, $response);
            $response->setBody($bytes);
        }
    }
public function force ( $ bytes , $ filename , Zend_Controller_Response_Abstract $ response ) { if ( ! strlen ( $ bytes ) ) { $ response -> setBody ( 'Sorry, we could not find the requested file.' ) ; } else { // Disable view and layout rendering Zend_Controller_Action_HelperBroker :: getExistingHelper ( 'viewRenderer' ) -> setNoRender ( ) ; Zend_Controller_Action_HelperBroker :: getExistingHelper ( 'layout' ) -> disableLayout ( ) ; // Process the download $ this -> _setHeaders ( $ bytes , $ filename , $ response ) ; $ response -> setBody ( $ bytes ) ; } }
Force download dialog

@param String $bytes The bytes that are to be downloaded
@param String $filename The filename of the downloaded file
@param Zend_Controller_Response_Abstract $response The response object
@return Void
Force download dialog