protected function lang($language)
    {
        $pos = array_search($language, $this->request->getAcceptLanguage());
        if ($pos === FALSE) {
            throw new NotAcceptableException('No matching method for response type "'.join(', ', $this->request->getAcceptLanguage()).'"');
        }
        return count($this->request->getAcceptLanguage()) - $pos;
    }
protected function lang($language)
    {
        $pos = array_search($language, $this->request->getAcceptLanguage());
        if ($pos === FALSE) {
            throw new NotAcceptableException('No matching method for response type "'.join(', ', $this->request->getAcceptLanguage()).'"');
        }
        return count($this->request->getAcceptLanguage()) - $pos;
    }
protected function lang ( $ language ) { $ pos = array_search ( $ language , $ this -> request -> getAcceptLanguage ( ) ) ; if ( $ pos === FALSE ) { throw new NotAcceptableException ( 'No matching method for response type "' . join ( ', ' , $ this -> request -> getAcceptLanguage ( ) ) . '"' ) ; } return count ( $ this -> request -> getAcceptLanguage ( ) ) - $ pos ; }
Lang condition language code must be in request accept lang array, returns a number
based on the priority of the match.
@param  str $language
@return int
Lang condition language code must be in request accept lang array returns a number based on the priority of the match .