code: private function getLanguageValuesFromHeaders(array $headers): array
      {
          $languages = [];
  
          foreach ($headers as $header) {
              $languages[] = $header->getLanguage();
          }
  
          return $languages;
      }
docs: Gets the language values from a list of headers
  
  @param AcceptLanguageHeaderValue[] $headers The list of language headers
  @return array The list of language values from the headers