private function setSettings($settings)
    {
        if ($settings) {
            foreach ($this->settings as $key => &$value) {
                if (!empty($settings->{$key}) && $settings->{$key}) {
                    if (is_object($settings->{$key})) {
                        $value = array_merge(
                            $value,
                            json_decode(json_encode($settings->{$key}, JSON_FORCE_OBJECT), true)
                        );
                    } else {
                        $value = $settings->{$key};
                    }
                }
            }
        }
    }
private function setSettings($settings)
    {
        if ($settings) {
            foreach ($this->settings as $key => &$value) {
                if (!empty($settings->{$key}) && $settings->{$key}) {
                    if (is_object($settings->{$key})) {
                        $value = array_merge(
                            $value,
                            json_decode(json_encode($settings->{$key}, JSON_FORCE_OBJECT), true)
                        );
                    } else {
                        $value = $settings->{$key};
                    }
                }
            }
        }
    }
private function setSettings ( $ settings ) { if ( $ settings ) { foreach ( $ this -> settings as $ key => & $ value ) { if ( ! empty ( $ settings -> { $ key } ) && $ settings -> { $ key } ) { if ( is_object ( $ settings -> { $ key } ) ) { $ value = array_merge ( $ value , json_decode ( json_encode ( $ settings -> { $ key } , JSON_FORCE_OBJECT ) , true ) ) ; } else { $ value = $ settings -> { $ key } ; } } } } }
Retrieve File settings from the payload to override our defaults.

@param object $settings
Retrieve File settings from the payload to override our defaults .