PHPExiftool\Exiftool::getBinary PHP Méthode

getBinary() protected static méthode

protected static getBinary ( ) : string
Résultat string
    protected static function getBinary()
    {
        static $binary = null;
        if ($binary) {
            return $binary;
        }
        $dev = __DIR__ . '/../../vendor/phpexiftool/exiftool/exiftool';
        $packaged = __DIR__ . '/../../../../phpexiftool/exiftool/exiftool';
        foreach (array($packaged, $dev) as $location) {
            if (defined('PHP_WINDOWS_VERSION_BUILD')) {
                $location .= '.exe';
            }
            if (is_executable($location)) {
                return $binary = realpath($location);
            }
        }
        throw new RuntimeException('Unable to get exiftool binary');
    }