From: Vincent Vanwaelscappel Date: Tue, 20 Dec 2022 09:18:30 +0000 (+0100) Subject: wip #5661 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=1df8a20be9fd6d50873388d776b9b5978f32c8ca;p=cubist_util.git wip #5661 @0.25 --- diff --git a/src/CommandLine.php b/src/CommandLine.php index 48320a0..6ae43cb 100644 --- a/src/CommandLine.php +++ b/src/CommandLine.php @@ -21,7 +21,7 @@ class CommandLine protected $ssh = null; protected $longArgSeparator = '='; protected $timeout = 0; - protected $json = false; + protected $sudo = false; function __construct($program, $output = null, $error = true) { @@ -206,7 +206,7 @@ class CommandLine $commande = 'nohup ' . $commande; } - if ($this->json) { + if ($this->sudo) { $commande = 'sudo ' . $commande; } @@ -301,20 +301,19 @@ class CommandLine $this->timeout = $timeout; } - /** * @return bool */ - public function isJson(): bool + public function isSudo(): bool { - return $this->json; + return $this->sudo; } /** - * @param bool $json + * @param bool $sudo */ - public function setJson(bool $json): void + public function setSudo(bool $sudo): void { - $this->json = $json; + $this->sudo = $sudo; } } diff --git a/src/CommandLine/Imagemagick.php b/src/CommandLine/Imagemagick.php index 90eaf03..d7148ce 100644 --- a/src/CommandLine/Imagemagick.php +++ b/src/CommandLine/Imagemagick.php @@ -44,12 +44,17 @@ class Imagemagick extends CommandLine if ($this->getSrc()) { $this->setArg(null, $this->getSrc()); } + $this->_setMiddleConversionArgs(); if ($this->getDest()) { $this->setArg(null, $this->getDest()); } parent::execute($fonction); } + protected function _setMiddleConversionArgs(){ + + } + protected function _setConversionArgs() { diff --git a/src/CommandLine/Imagemagick/Ico.php b/src/CommandLine/Imagemagick/Ico.php index 9c9786c..57f7880 100644 --- a/src/CommandLine/Imagemagick/Ico.php +++ b/src/CommandLine/Imagemagick/Ico.php @@ -8,7 +8,7 @@ use Cubist\Util\Graphics\Image; class Ico extends Imagemagick { - protected function _setConversionArgs() + protected function _setMiddleConversionArgs() { parent::_setConversionArgs(); $allSizes = [256, 128, 164, 48, 32, 16];