Upgrading vendor folder dependencies.
This commit is contained in:
parent
4a0cbcd770
commit
acbe9ad9e5
229 changed files with 10735 additions and 4528 deletions
2
vendor/git.apache.org/thrift.git/lib/php/lib/Base/TBase.php
generated
vendored
2
vendor/git.apache.org/thrift.git/lib/php/lib/Base/TBase.php
generated
vendored
|
@ -33,7 +33,7 @@ use Thrift\Type\TType;
|
|||
*/
|
||||
abstract class TBase
|
||||
{
|
||||
static public $tmethod = array(
|
||||
public static $tmethod = array(
|
||||
TType::BOOL => 'Bool',
|
||||
TType::BYTE => 'Byte',
|
||||
TType::I16 => 'I16',
|
||||
|
|
2
vendor/git.apache.org/thrift.git/lib/php/lib/Exception/TApplicationException.php
generated
vendored
2
vendor/git.apache.org/thrift.git/lib/php/lib/Exception/TApplicationException.php
generated
vendored
|
@ -26,7 +26,7 @@ use Thrift\Type\TType;
|
|||
|
||||
class TApplicationException extends TException
|
||||
{
|
||||
static public $_TSPEC =
|
||||
public static $_TSPEC =
|
||||
array(1 => array('var' => 'message',
|
||||
'type' => TType::STRING),
|
||||
2 => array('var' => 'code',
|
||||
|
|
2
vendor/git.apache.org/thrift.git/lib/php/lib/Exception/TException.php
generated
vendored
2
vendor/git.apache.org/thrift.git/lib/php/lib/Exception/TException.php
generated
vendored
|
@ -56,7 +56,7 @@ class TException extends \Exception
|
|||
}
|
||||
}
|
||||
|
||||
static public $tmethod = array(
|
||||
public static $tmethod = array(
|
||||
TType::BOOL => 'Bool',
|
||||
TType::BYTE => 'Byte',
|
||||
TType::I16 => 'I16',
|
||||
|
|
18
vendor/git.apache.org/thrift.git/lib/php/lib/Transport/TCurlClient.php
generated
vendored
18
vendor/git.apache.org/thrift.git/lib/php/lib/Transport/TCurlClient.php
generated
vendored
|
@ -169,6 +169,24 @@ class TCurlClient extends TTransport
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Guarantees that the full amount of data is read. Since TCurlClient gets entire payload at
|
||||
* once, parent readAll cannot be used.
|
||||
*
|
||||
* @return string The data, of exact length
|
||||
* @throws TTransportException if cannot read data
|
||||
*/
|
||||
public function readAll($len)
|
||||
{
|
||||
$data = $this->read($len);
|
||||
|
||||
if (TStringFuncFactory::create()->strlen($data) !== $len) {
|
||||
throw new TTransportException('TCurlClient could not read '.$len.' bytes');
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes some data into the pending buffer
|
||||
*
|
||||
|
|
25
vendor/git.apache.org/thrift.git/lib/php/lib/Transport/THttpClient.php
generated
vendored
25
vendor/git.apache.org/thrift.git/lib/php/lib/Transport/THttpClient.php
generated
vendored
|
@ -88,14 +88,23 @@ class THttpClient extends TTransport
|
|||
*/
|
||||
protected $headers_;
|
||||
|
||||
/**
|
||||
* Context additional options
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $context_;
|
||||
|
||||
/**
|
||||
* Make a new HTTP client.
|
||||
*
|
||||
* @param string $host
|
||||
* @param int $port
|
||||
* @param int $port
|
||||
* @param string $uri
|
||||
* @param string $scheme
|
||||
* @param array $context
|
||||
*/
|
||||
public function __construct($host, $port = 80, $uri = '', $scheme = 'http')
|
||||
public function __construct($host, $port = 80, $uri = '', $scheme = 'http', array $context = array())
|
||||
{
|
||||
if ((TStringFuncFactory::create()->strlen($uri) > 0) && ($uri{0} != '/')) {
|
||||
$uri = '/' . $uri;
|
||||
|
@ -108,6 +117,7 @@ class THttpClient extends TTransport
|
|||
$this->handle_ = null;
|
||||
$this->timeout_ = null;
|
||||
$this->headers_ = array();
|
||||
$this->context_ = $context;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -211,16 +221,21 @@ class THttpClient extends TTransport
|
|||
$headers[] = "$key: $value";
|
||||
}
|
||||
|
||||
$options = array('method' => 'POST',
|
||||
$options = $this->context_;
|
||||
|
||||
$baseHttpOptions = isset($options["http"]) ? $options["http"] : array();
|
||||
|
||||
$httpOptions = $baseHttpOptions + array('method' => 'POST',
|
||||
'header' => implode("\r\n", $headers),
|
||||
'max_redirects' => 1,
|
||||
'content' => $this->buf_);
|
||||
if ($this->timeout_ > 0) {
|
||||
$options['timeout'] = $this->timeout_;
|
||||
$httpOptions['timeout'] = $this->timeout_;
|
||||
}
|
||||
$this->buf_ = '';
|
||||
|
||||
$contextid = stream_context_create(array('http' => $options));
|
||||
$options["http"] = $httpOptions;
|
||||
$contextid = stream_context_create($options);
|
||||
$this->handle_ = @fopen(
|
||||
$this->scheme_ . '://' . $host . $this->uri_,
|
||||
'r',
|
||||
|
|
|
@ -305,7 +305,7 @@ public:
|
|||
|
||||
void skip(size_t len) {
|
||||
while (len) {
|
||||
size_t chunk_size = std::min(len, buffer_used);
|
||||
size_t chunk_size = (std::min)(len, buffer_used);
|
||||
if (chunk_size) {
|
||||
buffer_ptr = reinterpret_cast<char*>(buffer_ptr) + chunk_size;
|
||||
buffer_used -= chunk_size;
|
||||
|
@ -318,7 +318,7 @@ public:
|
|||
|
||||
void readBytes(void* buf, size_t len) {
|
||||
while (len) {
|
||||
size_t chunk_size = std::min(len, buffer_used);
|
||||
size_t chunk_size = (std::min)(len, buffer_used);
|
||||
if (chunk_size) {
|
||||
memcpy(buf, buffer_ptr, chunk_size);
|
||||
buffer_ptr = reinterpret_cast<char*>(buffer_ptr) + chunk_size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue