public function generateOptions()
    {
        $generated = [];
        array_walk($this->options, function ($value, $key) use (&$generated) {
            $result = "";
            switch ($key) {
                case "singlePage":
                    $result = $value ? "-c" : "-s";
                break;
                case "imageJpeg":
                    $result = "-fmt ".($value ? "jpg" : "png");
                break;
                case "zoom":
                    $result = "-zoom ".$value;
                break;
                case "ignoreImages":
                    $result = $value ? "-i" : "";
                break;
                case 'noFrames':
                    $result = $value ? '-noframes' : '';
                break;
            }
            $generated[] = $result;
        });

        return implode(" ", $generated);
    }
public function generateOptions()
    {
        $generated = [];
        array_walk($this->options, function ($value, $key) use (&$generated) {
            $result = "";
            switch ($key) {
                case "singlePage":
                    $result = $value ? "-c" : "-s";
                break;
                case "imageJpeg":
                    $result = "-fmt ".($value ? "jpg" : "png");
                break;
                case "zoom":
                    $result = "-zoom ".$value;
                break;
                case "ignoreImages":
                    $result = $value ? "-i" : "";
                break;
                case 'noFrames':
                    $result = $value ? '-noframes' : '';
                break;
            }
            $generated[] = $result;
        });

        return implode(" ", $generated);
    }
public function generateOptions ( ) { $ generated = [ ] ; array_walk ( $ this -> options , function ( $ value , $ key ) use ( & $ generated ) { $ result = "" ; switch ( $ key ) { case "singlePage" : $ result = $ value ? "-c" : "-s" ; break ; case "imageJpeg" : $ result = "-fmt " . ( $ value ? "jpg" : "png" ) ; break ; case "zoom" : $ result = "-zoom " . $ value ; break ; case "ignoreImages" : $ result = $ value ? "-i" : "" ; break ; case 'noFrames' : $ result = $ value ? '-noframes' : '' ; break ; } $ generated [ ] = $ result ; } ) ; return implode ( " " , $ generated ) ; }
generate options based on the preserved options
@return string options that will be passed on running the command
generate options based on the preserved options