Subiendo proyecto completo sin restricciones de git ignore

This commit is contained in:
Jose Sanchez
2023-08-17 11:44:02 -04:00
parent a0d4f5ba3b
commit 20f1c60600
19921 changed files with 2509159 additions and 45 deletions

View File

@@ -0,0 +1,57 @@
<?php
namespace PayPalHttp;
/**
* Class Curl
* @package PayPalHttp
*
* Curl wrapper used by HttpClient to make curl requests.
* @see HttpClient
*/
class Curl
{
protected $curl;
public function __construct($curl = NULL)
{
if (is_null($curl))
{
$curl = curl_init();
}
$this->curl = $curl;
}
public function setOpt($option, $value)
{
curl_setopt($this->curl, $option, $value);
return $this;
}
public function close()
{
curl_close($this->curl);
return $this;
}
public function exec()
{
return curl_exec($this->curl);
}
public function errNo()
{
return curl_errno($this->curl);
}
public function getInfo($option)
{
return curl_getinfo($this->curl, $option);
}
public function error()
{
return curl_error($this->curl);
}
}