public static function unzipAssets($src, $dst) {

        if (false === is_dir($dst)) {
            throw new InvalidArgumentException(sprintf("\"%s\" is not a directory", $dst));
        }

        $result = [];

        foreach (static::listAssets($src) as $current) {

            $zip = new ZipArchive();

            if (true === $zip->open($current)) {
                $result[$current] = $zip->extractTo(realpath($dst));
                $zip->close();
            }
        }

        return $result;
    }
public static function unzipAssets($src, $dst) {

        if (false === is_dir($dst)) {
            throw new InvalidArgumentException(sprintf("\"%s\" is not a directory", $dst));
        }

        $result = [];

        foreach (static::listAssets($src) as $current) {

            $zip = new ZipArchive();

            if (true === $zip->open($current)) {
                $result[$current] = $zip->extractTo(realpath($dst));
                $zip->close();
            }
        }

        return $result;
    }
public static function unzipAssets ( $ src , $ dst ) { if ( false === is_dir ( $ dst ) ) { throw new InvalidArgumentException ( sprintf ( "\"%s\" is not a directory" , $ dst ) ) ; } $ result = [ ] ; foreach ( static :: listAssets ( $ src ) as $ current ) { $ zip = new ZipArchive ( ) ; if ( true === $ zip -> open ( $ current ) ) { $ result [ $ current ] = $ zip -> extractTo ( realpath ( $ dst ) ) ; $ zip -> close ( ) ; } } return $ result ; }
Unzip all assets.

@param string $src The source directory.
@param string $dst The destination directory.
@return array Returns the assets.
@throws InvalidArgumentException Throw an invalid argument if a directory is not a directory.
Unzip all assets .