You are here

public function ImagemagickToolkit::checkPath in ImageMagick 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/ImageToolkit/ImagemagickToolkit.php \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::checkPath()

Verifies file path of the executable binary by checking its version.

Parameters

string $path: The user-submitted file path to the convert binary.

string $package: (optional) The graphics package to use.

Return value

array An associative array containing:

  • output: The shell output of 'convert -version', if any.
  • errors: A list of error messages indicating if the executable could not be found or executed.

Deprecated

in 8.x-2.3, will be removed in 8.x-3.0. Use ImagemagickExecManagerInterface::checkPath() instead.

See also

https://www.drupal.org/project/imagemagick/issues/2938375

File

src/Plugin/ImageToolkit/ImagemagickToolkit.php, line 526

Class

ImagemagickToolkit
Provides ImageMagick integration toolkit for image manipulation.

Namespace

Drupal\imagemagick\Plugin\ImageToolkit

Code

public function checkPath($path, $package = NULL) {
  @trigger_error('checkPath() is deprecated in 8.x-2.3, will be removed in 8.x-3.0. Use ImagemagickExecManagerInterface::checkPath() instead. See https://www.drupal.org/project/imagemagick/issues/2938375.', E_USER_DEPRECATED);
  return $this
    ->getExecManager()
    ->checkPath($path, $package);
}