/** * @return resource Connection resource */ protected function _getConnection() { if (!self::$_connection) { self::$_connection = curl_init(); } return self::$_connection; }
/** * Sends request to server * * @return string Response string */ public function send() { $transport = new Jirapi_Transport($this); $params = array('url' => $this->getClient()->getConfig('url'), 'host' => $this->getClient()->getHost(), 'port' => $this->getClient()->getPort(), 'path' => $this->getClient()->getPath(), 'username' => $this->getClient()->getConfig('username'), 'password' => $this->getClient()->getConfig('password')); $response = $transport->exec($params); return $response; }