src/Sly/NotificationPusher/Adapter/Gcm.php
public function setAdapterParameters(array $config = [])
    {
        if (!is_array($config) || empty($config)) {
            throw new InvalidArgumentException('$config must be an associative array with at least 1 item.');
        }

        if ($this->httpClient === null) {
            $this->httpClient = new HttpClient();
            $this->httpClient->setAdapter(new HttpSocketAdapter());
        }

        $this->httpClient->getAdapter()->setOptions($config);
    }
public function setAdapterParameters(array $config = [])
    {
        if (!is_array($config) || empty($config)) {
            throw new InvalidArgumentException('$config must be an associative array with at least 1 item.');
        }

        if ($this->httpClient === null) {
            $this->httpClient = new HttpClient();
            $this->httpClient->setAdapter(new HttpSocketAdapter());
        }

        $this->httpClient->getAdapter()->setOptions($config);
    }
public function setAdapterParameters ( array $ config = [ ] ) { if ( ! is_array ( $ config ) || empty ( $ config ) ) { throw new InvalidArgumentException ( '$config must be an associative array with at least 1 item.' ) ; } if ( $ this -> httpClient === null ) { $ this -> httpClient = new HttpClient ( ) ; $ this -> httpClient -> setAdapter ( new HttpSocketAdapter ( ) ) ; } $ this -> httpClient -> getAdapter ( ) -> setOptions ( $ config ) ; }
Send custom parameters to the Http Adapter without overriding the Http Client.

@param array $config

@throws \InvalidArgumentException
Send custom parameters to the Http Adapter without overriding the Http Client .