]> _ Git - cubist_util.git/commitdiff
wip #5661 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 20 Dec 2022 09:18:30 +0000 (10:18 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 20 Dec 2022 09:18:30 +0000 (10:18 +0100)
src/CommandLine.php
src/CommandLine/Imagemagick.php
src/CommandLine/Imagemagick/Ico.php

index 48320a062a2bd8b112ca3866ba936b2c9968d89e..6ae43cb59106ac811035d23009780c2309865f09 100644 (file)
@@ -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;
     }
 }
index 90eaf0360d8189b488bea23b9ccfd9ad97606aaa..d7148cec480146b03be29dfc619243bbf62d273b 100644 (file)
@@ -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()
     {
 
index 9c9786ca92730fd0cd8434b9c3f2b4f1a0ce161b..57f7880007b55e85f4816b5b18ec411d40357d07 100644 (file)
@@ -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];