コード例 #1
0
ファイル: Transport.php プロジェクト: ruflin/Jirapi
 /**
  * @return resource Connection resource
  */
 protected function _getConnection()
 {
     if (!self::$_connection) {
         self::$_connection = curl_init();
     }
     return self::$_connection;
 }
コード例 #2
0
ファイル: Request.php プロジェクト: ruflin/Jirapi
 /**
  * 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;
 }