public function negotiate()
    {
        $request = $this->request ?: Yii::getApp()->getRequest();
        $response = $this->response ?: Yii::getApp()->getResponse();
        if (!empty($this->formats)) {
            $this->negotiateContentType($request, $response);
        }
        if (!empty($this->languages)) {
            Yii::get('i18n')->setLocale($this->negotiateLanguage($request));
        }
    }
public function negotiate()
    {
        $request = $this->request ?: Yii::getApp()->getRequest();
        $response = $this->response ?: Yii::getApp()->getResponse();
        if (!empty($this->formats)) {
            $this->negotiateContentType($request, $response);
        }
        if (!empty($this->languages)) {
            Yii::get('i18n')->setLocale($this->negotiateLanguage($request));
        }
    }
public function negotiate ( ) { $ request = $ this -> request ? : Yii :: getApp ( ) -> getRequest ( ) ; $ response = $ this -> response ? : Yii :: getApp ( ) -> getResponse ( ) ; if ( ! empty ( $ this -> formats ) ) { $ this -> negotiateContentType ( $ request , $ response ) ; } if ( ! empty ( $ this -> languages ) ) { Yii :: get ( 'i18n' ) -> setLocale ( $ this -> negotiateLanguage ( $ request ) ) ; } }
Negotiates the response format and application language.
Negotiates the response format and application language .