src/Mailjet/Client.php
private function initSettings($call, $settings = [])
    {
        if (!empty($settings['url']) && is_string($settings['url'])) {
            $this->settings['url'] = $settings['url'];
        } else {
            $this->settings['url'] = $this->url;
        }

        if (!empty($settings['version']) && is_string($settings['version'])) {
            $this->settings['version'] = $settings['version'];
        } else {
            $this->settings['version'] = $this->version;
        }

        $settings['call'] = $call;
        if (isset($settings['call']) && is_bool($settings['call'])) {
            $this->settings['call'] = $settings['call'];
        } else {
            $this->settings['call'] = $this->call;
        }

        if (isset($settings['secured']) && is_bool($settings['secured'])) {
            $this->settings['secured'] = $settings['secured'];
        } else {
            $this->settings['secured'] = $this->secure;
        }

        $this->changed = false;
    }
private function initSettings($call, $settings = [])
    {
        if (!empty($settings['url']) && is_string($settings['url'])) {
            $this->settings['url'] = $settings['url'];
        } else {
            $this->settings['url'] = $this->url;
        }

        if (!empty($settings['version']) && is_string($settings['version'])) {
            $this->settings['version'] = $settings['version'];
        } else {
            $this->settings['version'] = $this->version;
        }

        $settings['call'] = $call;
        if (isset($settings['call']) && is_bool($settings['call'])) {
            $this->settings['call'] = $settings['call'];
        } else {
            $this->settings['call'] = $this->call;
        }

        if (isset($settings['secured']) && is_bool($settings['secured'])) {
            $this->settings['secured'] = $settings['secured'];
        } else {
            $this->settings['secured'] = $this->secure;
        }

        $this->changed = false;
    }
private function initSettings ( $ call , $ settings = [ ] ) { if ( ! empty ( $ settings [ 'url' ] ) && is_string ( $ settings [ 'url' ] ) ) { $ this -> settings [ 'url' ] = $ settings [ 'url' ] ; } else { $ this -> settings [ 'url' ] = $ this -> url ; } if ( ! empty ( $ settings [ 'version' ] ) && is_string ( $ settings [ 'version' ] ) ) { $ this -> settings [ 'version' ] = $ settings [ 'version' ] ; } else { $ this -> settings [ 'version' ] = $ this -> version ; } $ settings [ 'call' ] = $ call ; if ( isset ( $ settings [ 'call' ] ) && is_bool ( $ settings [ 'call' ] ) ) { $ this -> settings [ 'call' ] = $ settings [ 'call' ] ; } else { $ this -> settings [ 'call' ] = $ this -> call ; } if ( isset ( $ settings [ 'secured' ] ) && is_bool ( $ settings [ 'secured' ] ) ) { $ this -> settings [ 'secured' ] = $ settings [ 'secured' ] ; } else { $ this -> settings [ 'secured' ] = $ this -> secure ; } $ this -> changed = false ; }
Set a backup if the variables generating the url are change during a call.
Set a backup if the variables generating the url are change during a call .