public function setSettings(array $settings = []) : self
    {
        $this->settings = array_merge($this->settings, $settings);
        // loop through checking each setting
        foreach ($this->allowedSettings as $name => $allowed) {
            $this->validateSettings->__invoke($name, $this->settings[$name], $allowed);
        }

        return $this;
    }
public function setSettings(array $settings = []) : self
    {
        $this->settings = array_merge($this->settings, $settings);
        // loop through checking each setting
        foreach ($this->allowedSettings as $name => $allowed) {
            $this->validateSettings->__invoke($name, $this->settings[$name], $allowed);
        }

        return $this;
    }
public function setSettings ( array $ settings = [ ] ) : self { $ this -> settings = array_merge ( $ this -> settings , $ settings ) ; // loop through checking each setting foreach ( $ this -> allowedSettings as $ name => $ allowed ) { $ this -> validateSettings -> __invoke ( $ name , $ this -> settings [ $ name ] , $ allowed ) ; } return $ this ; }
Set the settings.

@param array $settings The new settings to be merged in.

@return self
Set the settings .