controllers/DownloadController.php
/**
     * Downloads file on client machine
     * 
     * @param int $pid
     */
Downloads file on client machine

@param int $pid
Downloads file on client machine @param int $pid
private function downloadFile($pid) {
        $fileInfo = $this->getModel()->getFileInfoFromDB($pid);
        $fileContents = $this->getFileContents($fileInfo);
        $fileName = $fileInfo[ProgramDetails_DBTable::ACTUAL_FILE_NAME];
        $this->sendDownloadHeaders($fileName, $fileContents);
        die($fileContents);
    }
private function downloadFile ( $ pid ) { $ fileInfo = $ this -> getModel ( ) -> getFileInfoFromDB ( $ pid ) ; $ fileContents = $ this -> getFileContents ( $ fileInfo ) ; $ fileName = $ fileInfo [ ProgramDetails_DBTable :: ACTUAL_FILE_NAME ] ; $ this -> sendDownloadHeaders ( $ fileName , $ fileContents ) ; die ( $ fileContents ) ; }
Downloads file on client machine
Downloads file on client machine