protected function searchEncoder($needle) {
    if (is_array($needle)) {
      foreach ($needle as $n) {
        $result = $this->searchEncoder($n);
        if ($result) {
          return $result;
        }
      }
      return false;
    }

    $encoders = $this->getEncoders();
    foreach ($encoders as $encoder) {
      if (strpos($encoder, $needle) !== false) {
        return $encoder;
      }
    }
    return false;
  }
protected function searchEncoder($needle) {
    if (is_array($needle)) {
      foreach ($needle as $n) {
        $result = $this->searchEncoder($n);
        if ($result) {
          return $result;
        }
      }
      return false;
    }

    $encoders = $this->getEncoders();
    foreach ($encoders as $encoder) {
      if (strpos($encoder, $needle) !== false) {
        return $encoder;
      }
    }
    return false;
  }
protected function searchEncoder ( $ needle ) { if ( is_array ( $ needle ) ) { foreach ( $ needle as $ n ) { $ result = $ this -> searchEncoder ( $ n ) ; if ( $ result ) { return $ result ; } } return false ; } $ encoders = $ this -> getEncoders ( ) ; foreach ( $ encoders as $ encoder ) { if ( strpos ( $ encoder , $ needle ) !== false ) { return $ encoder ; } } return false ; }
Search for matching encoder

@param string|array $needle Encoder type
@return mixed
Search for matching encoder