You are here

public function ImagemagickExecArguments::addArgument in ImageMagick 8.2

Adds a command line argument.

Parameters

string $arg: The command line argument to be added.

Return value

$this

Deprecated

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

See also

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

File

src/ImagemagickExecArguments.php, line 189

Class

ImagemagickExecArguments
Stores arguments for execution of ImageMagick/GraphicsMagick commands.

Namespace

Drupal\imagemagick

Code

public function addArgument($arg) {
  @trigger_error('addArgument() is deprecated in 8.x-2.3, will be removed in 8.x-3.0. Use ::add() instead. See https://www.drupal.org/project/imagemagick/issues/2925780.', E_USER_DEPRECATED);
  if (strpos($arg, self::INTERNAL_ARGUMENT_IDENTIFIER) === 0) {
    @trigger_error('Adding internal arguments prefixing them with ImagemagickExecArguments::INTERNAL_ARGUMENT_IDENTIFIER is deprecated in 8.x-2.3, will be removed in 8.x-3.0. ::add() them with ImageMagickExecArguments::INTERNAL instead. See https://www.drupal.org/project/imagemagick/issues/2925780.', E_USER_DEPRECATED);
    return $this
      ->add(substr($arg, strlen(self::INTERNAL_ARGUMENT_IDENTIFIER)), self::INTERNAL);
  }
  return $this
    ->add($arg);
}