|
|
@ -60,7 +60,7 @@ class BaseStub |
|
|
|
} |
|
|
|
} |
|
|
|
if ($channel) { |
|
|
|
if ($channel) { |
|
|
|
if (!is_a($channel, 'Grpc\Channel') && |
|
|
|
if (!is_a($channel, 'Grpc\Channel') && |
|
|
|
!is_a($channel, 'Grpc\InterceptorChannel')) { |
|
|
|
!is_a($channel, 'Grpc\Internal\InterceptorChannel')) { |
|
|
|
throw new \Exception('The channel argument is not a Channel object '. |
|
|
|
throw new \Exception('The channel argument is not a Channel object '. |
|
|
|
'or an InterceptorChannel object created by '. |
|
|
|
'or an InterceptorChannel object created by '. |
|
|
|
'Interceptor::intercept($channel, Interceptor|Interceptor[] $interceptors)'); |
|
|
|
'Interceptor::intercept($channel, Interceptor|Interceptor[] $interceptors)'); |
|
|
@ -365,7 +365,7 @@ class BaseStub |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private function _UnaryUnaryCallFactory($channel, $deserialize) |
|
|
|
private function _UnaryUnaryCallFactory($channel, $deserialize) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (is_a($channel, 'Grpc\InterceptorChannel')) { |
|
|
|
if (is_a($channel, 'Grpc\Internal\InterceptorChannel')) { |
|
|
|
return function ($method, |
|
|
|
return function ($method, |
|
|
|
$argument, |
|
|
|
$argument, |
|
|
|
array $metadata = [], |
|
|
|
array $metadata = [], |
|
|
@ -392,7 +392,7 @@ class BaseStub |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private function _UnaryStreamCallFactory($channel, $deserialize) |
|
|
|
private function _UnaryStreamCallFactory($channel, $deserialize) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (is_a($channel, 'Grpc\InterceptorChannel')) { |
|
|
|
if (is_a($channel, 'Grpc\Internal\InterceptorChannel')) { |
|
|
|
return function ($method, |
|
|
|
return function ($method, |
|
|
|
$argument, |
|
|
|
$argument, |
|
|
|
array $metadata = [], |
|
|
|
array $metadata = [], |
|
|
@ -419,7 +419,7 @@ class BaseStub |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private function _StreamUnaryCallFactory($channel, $deserialize) |
|
|
|
private function _StreamUnaryCallFactory($channel, $deserialize) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (is_a($channel, 'Grpc\InterceptorChannel')) { |
|
|
|
if (is_a($channel, 'Grpc\Internal\InterceptorChannel')) { |
|
|
|
return function ($method, |
|
|
|
return function ($method, |
|
|
|
array $metadata = [], |
|
|
|
array $metadata = [], |
|
|
|
array $options = []) use ($channel, $deserialize) { |
|
|
|
array $options = []) use ($channel, $deserialize) { |
|
|
@ -444,7 +444,7 @@ class BaseStub |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private function _StreamStreamCallFactory($channel, $deserialize) |
|
|
|
private function _StreamStreamCallFactory($channel, $deserialize) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (is_a($channel, 'Grpc\InterceptorChannel')) { |
|
|
|
if (is_a($channel, 'Grpc\Internal\InterceptorChannel')) { |
|
|
|
return function ($method, |
|
|
|
return function ($method, |
|
|
|
array $metadata = [], |
|
|
|
array $metadata = [], |
|
|
|
array $options = []) use ($channel, $deserialize) { |
|
|
|
array $options = []) use ($channel, $deserialize) { |
|
|
|