Update PHP Facebook SDK

This commit is contained in:
RainLoop Team 2017-02-28 23:10:47 +03:00
parent 77fb74bc4a
commit 075e184f7d
84 changed files with 9906 additions and 7761 deletions

View file

@ -25,55 +25,56 @@ namespace Facebook\HttpClients;
/**
* Class FacebookStream
*
* Abstraction for the procedural stream elements so that the functions can be
* mocked and the implementation can be tested.
*
* @package Facebook
*/
class FacebookStream
{
/**
* @var resource Context stream resource instance
*/
protected $stream;
/**
* @var resource Context stream resource instance
*/
protected $stream;
/**
* @var array Response headers from the stream wrapper
*/
protected $responseHeaders;
/**
* @var array Response headers from the stream wrapper
*/
protected $responseHeaders;
/**
* Make a new context stream reference instance
*
* @param array $options
*/
public function streamContextCreate(array $options)
{
$this->stream = stream_context_create($options);
}
/**
* Make a new context stream reference instance
*
* @param array $options
*/
public function streamContextCreate(array $options)
{
$this->stream = stream_context_create($options);
}
/**
* The response headers from the stream wrapper
*
* @return array|null
*/
public function getResponseHeaders()
{
return $this->responseHeaders;
}
/**
* The response headers from the stream wrapper
*
* @return array|null
*/
public function getResponseHeaders()
{
return $this->responseHeaders;
}
/**
* Send a stream wrapped request
*
* @param string $url
*
* @return mixed
*/
public function fileGetContents($url)
{
$rawResponse = file_get_contents($url, false, $this->stream);
$this->responseHeaders = $http_response_header;
return $rawResponse;
}
/**
* Send a stream wrapped request
*
* @param string $url
*
* @return mixed
*/
public function fileGetContents($url)
{
$rawResponse = file_get_contents($url, false, $this->stream);
$this->responseHeaders = $http_response_header;
return $rawResponse;
}
}