public function create(array $aliases): CompressionMethodManager
    {
        $compressionMethods = [];
        foreach ($aliases as $alias) {
            if (\array_key_exists($alias, $this->compressionMethods)) {
                $compressionMethods[] = $this->compressionMethods[$alias];
            } else {
                throw new \InvalidArgumentException(\sprintf('The compression method with the alias "%s" is not supported.', $alias));
            }
        }

        return CompressionMethodManager::create($compressionMethods);
    }
public function create(array $aliases): CompressionMethodManager
    {
        $compressionMethods = [];
        foreach ($aliases as $alias) {
            if (\array_key_exists($alias, $this->compressionMethods)) {
                $compressionMethods[] = $this->compressionMethods[$alias];
            } else {
                throw new \InvalidArgumentException(\sprintf('The compression method with the alias "%s" is not supported.', $alias));
            }
        }

        return CompressionMethodManager::create($compressionMethods);
    }
public function create ( array $ aliases ) : CompressionMethodManager { $ compressionMethods = [ ] ; foreach ( $ aliases as $ alias ) { if ( \ array_key_exists ( $ alias , $ this -> compressionMethods ) ) { $ compressionMethods [ ] = $ this -> compressionMethods [ $ alias ] ; } else { throw new \ InvalidArgumentException ( \ sprintf ( 'The compression method with the alias "%s" is not supported.' , $ alias ) ) ; } } return CompressionMethodManager :: create ( $ compressionMethods ) ; }
Creates a compression method manager using the compression methods identified by the given aliases.
If one of the aliases does not exist, an exception is thrown.

@param string[] $aliases
Creates a compression method manager using the compression methods identified by the given aliases . If one of the aliases does not exist an exception is thrown .