ch = $ch; $this->consumerKey = $consumerKey; $this->consumerSecret = $consumerSecret; $this->doQueryString = $doQueryString; $this->parameters = $parameters; $this->processAuth(); } /** * Process auth. */ protected function processAuth() { if ($this->doQueryString) { $this->parameters['consumer_key'] = $this->consumerKey; $this->parameters['consumer_secret'] = $this->consumerSecret; } else { \curl_setopt($this->ch, CURLOPT_USERPWD, $this->consumerKey . ':' . $this->consumerSecret); } } /** * Get parameters. * * @return array */ public function getParameters() { return $this->parameters; } }