function TestToolkit::parseFile
Same name in other branches
- 9 core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php \Drupal\image_test\Plugin\ImageToolkit\TestToolkit::parseFile()
- 10 core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php \Drupal\image_test\Plugin\ImageToolkit\TestToolkit::parseFile()
- 11.x core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php \Drupal\image_test\Plugin\ImageToolkit\TestToolkit::parseFile()
Overrides ImageToolkitInterface::parseFile
File
-
core/
modules/ system/ tests/ modules/ image_test/ src/ Plugin/ ImageToolkit/ TestToolkit.php, line 133
Class
- TestToolkit
- Defines a Test toolkit for image manipulation within Drupal.
Namespace
Drupal\image_test\Plugin\ImageToolkitCode
public function parseFile() {
$this->logCall('parseFile', func_get_args());
$data = @getimagesize($this->getSource());
if ($data && in_array($data[2], static::supportedTypes())) {
$this->setType($data[2]);
$this->width = $data[0];
$this->height = $data[1];
return TRUE;
}
return FALSE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.