public function getAdapter()
    {
        if ($this->adapter instanceof Compress\CompressionAlgorithmInterface) {
            return $this->adapter;
        }

        $adapter = $this->adapter;
        $options = $this->getAdapterOptions();
        if (!class_exists($adapter)) {
            $adapter = 'Zend\\Filter\\Compress\\' . ucfirst($adapter);
            if (!class_exists($adapter)) {
                throw new Exception\RuntimeException(sprintf(
                    '%s unable to load adapter; class "%s" not found',
                    __METHOD__,
                    $this->adapter
                ));
            }
        }

        $this->adapter = new $adapter($options);
        if (!$this->adapter instanceof Compress\CompressionAlgorithmInterface) {
            throw new Exception\InvalidArgumentException("Compression adapter '" . $adapter . "' does not implement Zend\\Filter\\Compress\\CompressionAlgorithmInterface");
        }
        return $this->adapter;
    }
public function getAdapter()
    {
        if ($this->adapter instanceof Compress\CompressionAlgorithmInterface) {
            return $this->adapter;
        }

        $adapter = $this->adapter;
        $options = $this->getAdapterOptions();
        if (!class_exists($adapter)) {
            $adapter = 'Zend\\Filter\\Compress\\' . ucfirst($adapter);
            if (!class_exists($adapter)) {
                throw new Exception\RuntimeException(sprintf(
                    '%s unable to load adapter; class "%s" not found',
                    __METHOD__,
                    $this->adapter
                ));
            }
        }

        $this->adapter = new $adapter($options);
        if (!$this->adapter instanceof Compress\CompressionAlgorithmInterface) {
            throw new Exception\InvalidArgumentException("Compression adapter '" . $adapter . "' does not implement Zend\\Filter\\Compress\\CompressionAlgorithmInterface");
        }
        return $this->adapter;
    }
public function getAdapter ( ) { if ( $ this -> adapter instanceof Compress \ CompressionAlgorithmInterface ) { return $ this -> adapter ; } $ adapter = $ this -> adapter ; $ options = $ this -> getAdapterOptions ( ) ; if ( ! class_exists ( $ adapter ) ) { $ adapter = 'Zend\\Filter\\Compress\\' . ucfirst ( $ adapter ) ; if ( ! class_exists ( $ adapter ) ) { throw new Exception \ RuntimeException ( sprintf ( '%s unable to load adapter; class "%s" not found' , __METHOD__ , $ this -> adapter ) ) ; } } $ this -> adapter = new $ adapter ( $ options ) ; if ( ! $ this -> adapter instanceof Compress \ CompressionAlgorithmInterface ) { throw new Exception \ InvalidArgumentException ( "Compression adapter '" . $ adapter . "' does not implement Zend\\Filter\\Compress\\CompressionAlgorithmInterface" ) ; } return $ this -> adapter ; }
Returns the current adapter, instantiating it if necessary

@throws Exception\RuntimeException
@throws Exception\InvalidArgumentException
@return Compress\CompressionAlgorithmInterface
Returns the current adapter instantiating it if necessary