aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php
diff options
context:
space:
mode:
authorGravatar Zhouyihai Ding <ddyihai@google.com>2018-05-16 10:30:12 -0700
committerGravatar GitHub <noreply@github.com>2018-05-16 10:30:12 -0700
commite499d9bae870ada85b1ac9fbd84ed7405367c564 (patch)
tree072fef03bc8dcfb5be5eea9680744f8c64e6bbc2 /src/php
parentfd30b02486861a3da6019b86bd5e8d90a1ec3aba (diff)
parent3c047a2cd53a46c9856ad48570a40c9d20f3b5eb (diff)
Merge pull request #15399 from ZhouyihaiDing/interceptor_composer
PHP: fix InterceptorChannel not autoload by composer
Diffstat (limited to 'src/php')
-rw-r--r--src/php/lib/Grpc/BaseStub.php10
-rw-r--r--src/php/lib/Grpc/Interceptor.php4
-rw-r--r--src/php/lib/Grpc/Internal/InterceptorChannel.php4
3 files changed, 9 insertions, 9 deletions
diff --git a/src/php/lib/Grpc/BaseStub.php b/src/php/lib/Grpc/BaseStub.php
index 7860233ca2..0966193107 100644
--- a/src/php/lib/Grpc/BaseStub.php
+++ b/src/php/lib/Grpc/BaseStub.php
@@ -60,7 +60,7 @@ class BaseStub
}
if ($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 '.
'or an InterceptorChannel object created by '.
'Interceptor::intercept($channel, Interceptor|Interceptor[] $interceptors)');
@@ -365,7 +365,7 @@ class BaseStub
*/
private function _UnaryUnaryCallFactory($channel, $deserialize)
{
- if (is_a($channel, 'Grpc\InterceptorChannel')) {
+ if (is_a($channel, 'Grpc\Internal\InterceptorChannel')) {
return function ($method,
$argument,
array $metadata = [],
@@ -392,7 +392,7 @@ class BaseStub
*/
private function _UnaryStreamCallFactory($channel, $deserialize)
{
- if (is_a($channel, 'Grpc\InterceptorChannel')) {
+ if (is_a($channel, 'Grpc\Internal\InterceptorChannel')) {
return function ($method,
$argument,
array $metadata = [],
@@ -419,7 +419,7 @@ class BaseStub
*/
private function _StreamUnaryCallFactory($channel, $deserialize)
{
- if (is_a($channel, 'Grpc\InterceptorChannel')) {
+ if (is_a($channel, 'Grpc\Internal\InterceptorChannel')) {
return function ($method,
array $metadata = [],
array $options = []) use ($channel, $deserialize) {
@@ -444,7 +444,7 @@ class BaseStub
*/
private function _StreamStreamCallFactory($channel, $deserialize)
{
- if (is_a($channel, 'Grpc\InterceptorChannel')) {
+ if (is_a($channel, 'Grpc\Internal\InterceptorChannel')) {
return function ($method,
array $metadata = [],
array $options = []) use ($channel, $deserialize) {
diff --git a/src/php/lib/Grpc/Interceptor.php b/src/php/lib/Grpc/Interceptor.php
index 9c1b5616f2..e1b97f2a84 100644
--- a/src/php/lib/Grpc/Interceptor.php
+++ b/src/php/lib/Grpc/Interceptor.php
@@ -75,10 +75,10 @@ class Interceptor
{
if (is_array($interceptors)) {
for ($i = count($interceptors) - 1; $i >= 0; $i--) {
- $channel = new InterceptorChannel($channel, $interceptors[$i]);
+ $channel = new Internal\InterceptorChannel($channel, $interceptors[$i]);
}
} else {
- $channel = new InterceptorChannel($channel, $interceptors);
+ $channel = new Internal\InterceptorChannel($channel, $interceptors);
}
return $channel;
}
diff --git a/src/php/lib/Grpc/Internal/InterceptorChannel.php b/src/php/lib/Grpc/Internal/InterceptorChannel.php
index 9ac05748f3..4677fb5aef 100644
--- a/src/php/lib/Grpc/Internal/InterceptorChannel.php
+++ b/src/php/lib/Grpc/Internal/InterceptorChannel.php
@@ -17,7 +17,7 @@
*
*/
-namespace Grpc;
+namespace Grpc\Internal;
/**
* This is a PRIVATE API and can change without notice.
@@ -35,7 +35,7 @@ class InterceptorChannel
public function __construct($channel, $interceptor)
{
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 '.
'or an InterceptorChannel object created by '.
'Interceptor::intercept($channel, Interceptor|Interceptor[] $interceptors)');