public function setClientLocales($clientLocales): void
    {
        if(!$this->clientLocales)
            $this->clientLocales = new LocaleCollection();

        $this->clientLocales->removeAllLocales();

        foreach ($clientLocales as $locale) {
            if(is_string($locale)) {
                $locale = new Locale($locale);
            }

            if($locale instanceof Locale) {
                $this->clientLocales->addLocale($locale);
            }
        }
    }
public function setClientLocales($clientLocales): void
    {
        if(!$this->clientLocales)
            $this->clientLocales = new LocaleCollection();

        $this->clientLocales->removeAllLocales();

        foreach ($clientLocales as $locale) {
            if(is_string($locale)) {
                $locale = new Locale($locale);
            }

            if($locale instanceof Locale) {
                $this->clientLocales->addLocale($locale);
            }
        }
    }
public function setClientLocales ( $ clientLocales ) : void { if ( ! $ this -> clientLocales ) $ this -> clientLocales = new LocaleCollection ( ) ; $ this -> clientLocales -> removeAllLocales ( ) ; foreach ( $ clientLocales as $ locale ) { if ( is_string ( $ locale ) ) { $ locale = new Locale ( $ locale ) ; } if ( $ locale instanceof Locale ) { $ this -> clientLocales -> addLocale ( $ locale ) ; } } }
Sets the client locales. You may pass Locale objects or string values.
@param \Traversable|array $clientLocales
@throws BadLocaleException
Sets the client locales . You may pass Locale objects or string values .