original_string: public function download($file = null, $type = null, $file_name = null)
      {
          if (!empty($file) && @file_exists($file)) {
              if (is_null($file_name)) {
                  $file_name_parts = explode('/', $file);
                  $file_name = end( $file_name_parts );
              }
              $this->addHeader('Content-disposition', 'attachment; filename='.$file_name);
              $this->addHeader('Content-Type', 'application/force-download');
              $this->addHeader('Content-Transfer-Encoding', $type);
              $this->addHeader('Content-Length', filesize($file));
              $this->addHeader('Pragma', 'no-cache');
              $this->addHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0, public');
              $this->addHeader('Expires', '0'); 
              $this->renderHeaders();
              readfile( $file );
              exit;
          }
          return;
      }
code: public function download($file = null, $type = null, $file_name = null)
      {
          if (!empty($file) && @file_exists($file)) {
              if (is_null($file_name)) {
                  $file_name_parts = explode('/', $file);
                  $file_name = end( $file_name_parts );
              }
              $this->addHeader('Content-disposition', 'attachment; filename='.$file_name);
              $this->addHeader('Content-Type', 'application/force-download');
              $this->addHeader('Content-Transfer-Encoding', $type);
              $this->addHeader('Content-Length', filesize($file));
              $this->addHeader('Pragma', 'no-cache');
              $this->addHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0, public');
              $this->addHeader('Expires', '0'); 
              $this->renderHeaders();
              readfile( $file );
              exit;
          }
          return;
      }
code_tokens: public function download ( $ file = null , $ type = null , $ file_name = null ) { if ( ! empty ( $ file ) && @ file_exists ( $ file ) ) { if ( is_null ( $ file_name ) ) { $ file_name_parts = explode ( '/' , $ file ) ; $ file_name = end ( $ file_name_parts ) ; } $ this -> addHeader ( 'Content-disposition' , 'attachment; filename=' . $ file_name ) ; $ this -> addHeader ( 'Content-Type' , 'application/force-download' ) ; $ this -> addHeader ( 'Content-Transfer-Encoding' , $ type ) ; $ this -> addHeader ( 'Content-Length' , filesize ( $ file ) ) ; $ this -> addHeader ( 'Pragma' , 'no-cache' ) ; $ this -> addHeader ( 'Cache-Control' , 'must-revalidate, post-check=0, pre-check=0, public' ) ; $ this -> addHeader ( 'Expires' , '0' ) ; $ this -> renderHeaders ( ) ; readfile ( $ file ) ; exit ; } return ; }
docstring: Force client to download a file
  
  @param null $file
  @param null $type
  @param null $file_name
docstring_tokens: Force client to download a file