src/Mailjet/Client.php
private function setOptions($options, $resource)
    {
        if (!empty($options['version']) && is_string($options['version'])) {
            $this->version = $options['version'];
        } elseif (!empty($resource[2])) {
            $this->version = $resource[2];
        }

        if (!empty($options['url']) && is_string($options['url'])) {
            $this->url = $options['url'];
        }

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

        if (isset($options['call']) && is_bool($options['call'])) {
            $this->call = $options['call'];
        }
        $this->changed = true;
    }
private function setOptions($options, $resource)
    {
        if (!empty($options['version']) && is_string($options['version'])) {
            $this->version = $options['version'];
        } elseif (!empty($resource[2])) {
            $this->version = $resource[2];
        }

        if (!empty($options['url']) && is_string($options['url'])) {
            $this->url = $options['url'];
        }

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

        if (isset($options['call']) && is_bool($options['call'])) {
            $this->call = $options['call'];
        }
        $this->changed = true;
    }
private function setOptions ( $ options , $ resource ) { if ( ! empty ( $ options [ 'version' ] ) && is_string ( $ options [ 'version' ] ) ) { $ this -> version = $ options [ 'version' ] ; } elseif ( ! empty ( $ resource [ 2 ] ) ) { $ this -> version = $ resource [ 2 ] ; } if ( ! empty ( $ options [ 'url' ] ) && is_string ( $ options [ 'url' ] ) ) { $ this -> url = $ options [ 'url' ] ; } if ( isset ( $ options [ 'secured' ] ) && is_bool ( $ options [ 'secured' ] ) ) { $ this -> secure = $ options [ 'secured' ] ; } if ( isset ( $ options [ 'call' ] ) && is_bool ( $ options [ 'call' ] ) ) { $ this -> call = $ options [ 'call' ] ; } $ this -> changed = true ; }
Temporary set the variables generating the url
@param array $options    contain temporary modifications for the client
@param array $resource   may contain the version linked to the ressource
Temporary set the variables generating the url