public function loadArray(array $config, $overwrite = false): void
    {
        foreach ($config as $name => $value) {
            if (!$overwrite && property_exists($this, $name)) {
                continue;
            }
            $this->$name = $value;
        }
    }
public function loadArray(array $config, $overwrite = false): void
    {
        foreach ($config as $name => $value) {
            if (!$overwrite && property_exists($this, $name)) {
                continue;
            }
            $this->$name = $value;
        }
    }
public function loadArray ( array $ config , $ overwrite = false ) : void { foreach ( $ config as $ name => $ value ) { if ( ! $ overwrite && property_exists ( $ this , $ name ) ) { continue ; } $ this -> $ name = $ value ; } }
Loads configuration from array.
@param array $config
@param bool $overwrite = false
Loads configuration from array .