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;
  }