public function downloadFile()
	{
		if($this->hasRequestParameter('id')){
			$fileService = $this->getServiceLocator()->get(FileReferenceSerializer::SERVICE_ID);
			$file = $fileService->unserialize($this->getRequestParameter('id'));
			header("Content-Disposition: attachment; filename=\"{$file->getBasename()}\"");
			tao_helpers_Http::returnStream($file->readPsrStream(), $file->getMimeType());
		}

	}
public function downloadFile()
	{
		if($this->hasRequestParameter('id')){
			$fileService = $this->getServiceLocator()->get(FileReferenceSerializer::SERVICE_ID);
			$file = $fileService->unserialize($this->getRequestParameter('id'));
			header("Content-Disposition: attachment; filename=\"{$file->getBasename()}\"");
			tao_helpers_Http::returnStream($file->readPsrStream(), $file->getMimeType());
		}

	}
public function downloadFile ( ) { if ( $ this -> hasRequestParameter ( 'id' ) ) { $ fileService = $ this -> getServiceLocator ( ) -> get ( FileReferenceSerializer :: SERVICE_ID ) ; $ file = $ fileService -> unserialize ( $ this -> getRequestParameter ( 'id' ) ) ; header ( "Content-Disposition: attachment; filename=\"{$file->getBasename()}\"" ) ; tao_helpers_Http :: returnStream ( $ file -> readPsrStream ( ) , $ file -> getMimeType ( ) ) ; } }
Download a resource file content
@param {String} uri Uri of the resource file
Download a resource file content