/** * Calls curl_exec * * This method exists so it can easily be overridden and mocked. * * @param resource $curlHandle * @return string */ protected function curlExec($curlHandle) { $return = null; $this->emit('curlExec', [&$return]); // If nothing modified $return, we're using the default behavior. if (is_null($return)) { return parent::curlExec($curlHandle); } else { return $return; } }