mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-30 08:57:27 +00:00
Inline documentation changes
git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@85955 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
@@ -179,23 +179,24 @@ class PHPExcel_Reader_Gnumeric implements PHPExcel_Reader_IReader
|
||||
}
|
||||
|
||||
/**
|
||||
* Can the current PHPExcel_Reader_IReader read the file?
|
||||
* Can the current PHPExcel_Reader_IReader read the file?
|
||||
*
|
||||
* @param string $pFileName
|
||||
* @return boolean
|
||||
* @param string $pFileName
|
||||
* @return boolean
|
||||
* @throws Exception
|
||||
*/
|
||||
public function canRead($pFilename)
|
||||
{
|
||||
// Check if gzlib functions are available
|
||||
if (!function_exists('gzread')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if file exists
|
||||
if (!file_exists($pFilename)) {
|
||||
throw new Exception("Could not open " . $pFilename . " for reading! File does not exist.");
|
||||
}
|
||||
|
||||
// Check if gzlib functions are available
|
||||
if (!function_exists('gzread')) {
|
||||
throw new Exception("gzlib library is not enabled");
|
||||
}
|
||||
|
||||
// Read signature data (first 3 bytes)
|
||||
$fh = fopen($pFilename, 'r');
|
||||
$data = fread($fh, 2);
|
||||
|
||||
Reference in New Issue
Block a user