public function getFile(string $id): ?FileResponse
	{
		$log = $this->getLog($id);
		if ($log) {
			$file = $log->name;
			if (Strings::endsWith($file, '.html')) {
				$contentType = 'text/html';
			} else {
				$contentType = 'text/plain';
			}
			return new FileResponse($this->path . $file, $file, $contentType, false);
		}
		return null;
	}
public function getFile(string $id): ?FileResponse
	{
		$log = $this->getLog($id);
		if ($log) {
			$file = $log->name;
			if (Strings::endsWith($file, '.html')) {
				$contentType = 'text/html';
			} else {
				$contentType = 'text/plain';
			}
			return new FileResponse($this->path . $file, $file, $contentType, false);
		}
		return null;
	}
public function getFile ( string $ id ) : ? FileResponse { $ log = $ this -> getLog ( $ id ) ; if ( $ log ) { $ file = $ log -> name ; if ( Strings :: endsWith ( $ file , '.html' ) ) { $ contentType = 'text/html' ; } else { $ contentType = 'text/plain' ; } return new FileResponse ( $ this -> path . $ file , $ file , $ contentType , false ) ; } return null ; }
Vrati soubor ke stazeni
@param string $id
@return FileResponse|null
@throws BadRequestException
Vrati soubor ke stazeni