protected function GetImageSize::doGetMetadataFromFile in File metadata manager 8
Same name and namespace in other branches
- 8.2 src/Plugin/FileMetadata/GetImageSize.php \Drupal\file_mdm\Plugin\FileMetadata\GetImageSize::doGetMetadataFromFile()
Gets file metadata from the file at URI/local path.
Return value
mixed The metadata retrieved from the file.
Throws
\Drupal\file_mdm\FileMetadataException In case there were significant errors reading from file.
Overrides FileMetadataPluginBase::doGetMetadataFromFile
File
- src/
Plugin/ FileMetadata/ GetImageSize.php, line 28
Class
- GetImageSize
- FileMetadata plugin for getimagesize.
Namespace
Drupal\file_mdm\Plugin\FileMetadataCode
protected function doGetMetadataFromFile() {
if ($data = @getimagesize($this
->getLocalTempPath())) {
return $data;
}
else {
return NULL;
}
}