mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-05 07:27:04 +03:00
Update PHP Facebook SDK
This commit is contained in:
parent
77fb74bc4a
commit
075e184f7d
84 changed files with 9906 additions and 7761 deletions
|
|
@ -25,105 +25,105 @@ namespace Facebook\HttpClients;
|
|||
|
||||
/**
|
||||
* Class FacebookCurl
|
||||
* Abstraction for the procedural curl elements so that curl can be mocked
|
||||
* and the implementation can be tested.
|
||||
*
|
||||
* Abstraction for the procedural curl elements so that curl can be mocked and the implementation can be tested.
|
||||
*
|
||||
* @package Facebook
|
||||
*/
|
||||
class FacebookCurl
|
||||
{
|
||||
|
||||
/**
|
||||
* @var resource Curl resource instance
|
||||
*/
|
||||
protected $curl;
|
||||
/**
|
||||
* @var resource Curl resource instance
|
||||
*/
|
||||
protected $curl;
|
||||
|
||||
/**
|
||||
* Make a new curl reference instance
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
$this->curl = curl_init();
|
||||
}
|
||||
/**
|
||||
* Make a new curl reference instance
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
$this->curl = curl_init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a curl option
|
||||
*
|
||||
* @param $key
|
||||
* @param $value
|
||||
*/
|
||||
public function setopt($key, $value)
|
||||
{
|
||||
curl_setopt($this->curl, $key, $value);
|
||||
}
|
||||
/**
|
||||
* Set a curl option
|
||||
*
|
||||
* @param $key
|
||||
* @param $value
|
||||
*/
|
||||
public function setopt($key, $value)
|
||||
{
|
||||
curl_setopt($this->curl, $key, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set an array of options to a curl resource
|
||||
*
|
||||
* @param array $options
|
||||
*/
|
||||
public function setopt_array(array $options)
|
||||
{
|
||||
curl_setopt_array($this->curl, $options);
|
||||
}
|
||||
/**
|
||||
* Set an array of options to a curl resource
|
||||
*
|
||||
* @param array $options
|
||||
*/
|
||||
public function setoptArray(array $options)
|
||||
{
|
||||
curl_setopt_array($this->curl, $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a curl request
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function exec()
|
||||
{
|
||||
return curl_exec($this->curl);
|
||||
}
|
||||
/**
|
||||
* Send a curl request
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function exec()
|
||||
{
|
||||
return curl_exec($this->curl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the curl error number
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function errno()
|
||||
{
|
||||
return curl_errno($this->curl);
|
||||
}
|
||||
/**
|
||||
* Return the curl error number
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function errno()
|
||||
{
|
||||
return curl_errno($this->curl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the curl error message
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function error()
|
||||
{
|
||||
return curl_error($this->curl);
|
||||
}
|
||||
/**
|
||||
* Return the curl error message
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function error()
|
||||
{
|
||||
return curl_error($this->curl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get info from a curl reference
|
||||
*
|
||||
* @param $type
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getinfo($type)
|
||||
{
|
||||
return curl_getinfo($this->curl, $type);
|
||||
}
|
||||
/**
|
||||
* Get info from a curl reference
|
||||
*
|
||||
* @param $type
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getinfo($type)
|
||||
{
|
||||
return curl_getinfo($this->curl, $type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the currently installed curl version
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function version()
|
||||
{
|
||||
return curl_version();
|
||||
}
|
||||
|
||||
/**
|
||||
* Close the resource connection to curl
|
||||
*/
|
||||
public function close()
|
||||
{
|
||||
curl_close($this->curl);
|
||||
}
|
||||
/**
|
||||
* Get the currently installed curl version
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function version()
|
||||
{
|
||||
return curl_version();
|
||||
}
|
||||
|
||||
/**
|
||||
* Close the resource connection to curl
|
||||
*/
|
||||
public function close()
|
||||
{
|
||||
curl_close($this->curl);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue