public function ImagemagickExecArguments::toString in ImageMagick 8.3
Same name and namespace in other branches
- 8.2 src/ImagemagickExecArguments.php \Drupal\imagemagick\ImagemagickExecArguments::toString()
Gets a portion of the command line arguments string.
Parameters
int $mode: The mode of the string on the command line. Can be self::PRE_SOURCE or self::POST_SOURCE.
Return value
string The sring of command line arguments.
File
- src/
ImagemagickExecArguments.php, line 113
Class
- ImagemagickExecArguments
- Stores arguments for execution of ImageMagick/GraphicsMagick commands.
Namespace
Drupal\imagemagickCode
public function toString(int $mode) : string {
if (!$this->arguments) {
return '';
}
$ret = [];
foreach ($this->arguments as $a) {
if ($a['mode'] === $mode) {
$ret[] = $a['argument'];
}
}
return implode(' ', $ret);
}