public function readClientLocalesFromRequest(Request $request) {
        $locales = [];

        foreach($request->getLanguages() as $client) {
            try {
                $locale = new Locale($client);
                $locales[] = $locale;
            } catch(\Exception $e) {
                trigger_error($e->getMessage(), E_USER_NOTICE);
            }
        }

        $this->setClientLocales($locales);
    }
public function readClientLocalesFromRequest(Request $request) {
        $locales = [];

        foreach($request->getLanguages() as $client) {
            try {
                $locale = new Locale($client);
                $locales[] = $locale;
            } catch(\Exception $e) {
                trigger_error($e->getMessage(), E_USER_NOTICE);
            }
        }

        $this->setClientLocales($locales);
    }
public function readClientLocalesFromRequest ( Request $ request ) { $ locales = [ ] ; foreach ( $ request -> getLanguages ( ) as $ client ) { try { $ locale = new Locale ( $ client ) ; $ locales [ ] = $ locale ; } catch ( \ Exception $ e ) { trigger_error ( $ e -> getMessage ( ) , E_USER_NOTICE ) ; } } $ this -> setClientLocales ( $ locales ) ; }
Reads the client locales from the request
@param Request $request
@throws BadLocaleException
Reads the client locales from the request