/** * Determines the best language to use based on the $supported * types the application says it supports, and the types requested * by the client. * * If no match is found, the first, highest-ranking client requested * type is returned. * * @param array $supported * * @return string */ public function language(array $supported) : string { return $this->getBestMatch($supported, $this->request->getHeader('accept-language')); }