ok

Mini Shell

Direktori : /home2/selectio/public_html/myclassicfit.com/vendor/spatie/image-optimizer/src/Optimizers/
Upload File :
Current File : /home2/selectio/public_html/myclassicfit.com/vendor/spatie/image-optimizer/src/Optimizers/Svgo.php

<?php

namespace Spatie\ImageOptimizer\Optimizers;

use Spatie\ImageOptimizer\Image;

class Svgo extends BaseOptimizer
{
    public $binaryName = 'svgo';

    public function canHandle(Image $image): bool
    {
        if ($image->extension() !== 'svg') {
            return false;
        }

        return in_array($image->mime(), [
            'text/html',
            'image/svg',
            'image/svg+xml',
            'text/plain',
        ]);
    }

    public function getCommand(): string
    {
        $optionString = implode(' ', $this->options);

        return "\"{$this->binaryPath}{$this->binaryName}\" {$optionString}"
            .' --input='.escapeshellarg($this->imagePath)
            .' --output='.escapeshellarg($this->imagePath);
    }
}

Zerion Mini Shell 1.0