original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Returns the current adapter, instantiating it if necessary
  
  @throws Exception\RuntimeException
  @throws Exception\InvalidArgumentException
  @return Compress\CompressionAlgorithmInterface
docstring_tokens: Returns the current adapter instantiating it if necessary