diff options
author | Stanley Cheung <stanleycheung@google.com> | 2015-07-27 10:19:45 -0700 |
---|---|---|
committer | Stanley Cheung <stanleycheung@google.com> | 2015-07-27 10:22:33 -0700 |
commit | db98e085704308bf03b2c68a9183336a3b37b422 (patch) | |
tree | 503c9a16ac2ccc9d1a2d17f4eb3d0eb8b5c839f4 /src/php/lib/Grpc | |
parent | 1f21f336ebe032e7dff185d551a3f48c8dcd4b5b (diff) |
Exposed channel target and call peer in PHP
Diffstat (limited to 'src/php/lib/Grpc')
-rw-r--r-- | src/php/lib/Grpc/AbstractCall.php | 7 | ||||
-rwxr-xr-x | src/php/lib/Grpc/BaseStub.php | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/php/lib/Grpc/AbstractCall.php b/src/php/lib/Grpc/AbstractCall.php index 5b28417a0d..35057224f8 100644 --- a/src/php/lib/Grpc/AbstractCall.php +++ b/src/php/lib/Grpc/AbstractCall.php @@ -68,6 +68,13 @@ abstract class AbstractCall { } /** + * @return string The URI of the endpoint. + */ + public function getPeer() { + return $this->call->getPeer(); + } + + /** * Cancels the call */ public function cancel() { diff --git a/src/php/lib/Grpc/BaseStub.php b/src/php/lib/Grpc/BaseStub.php index 8c438e4bf9..a0c677908c 100755 --- a/src/php/lib/Grpc/BaseStub.php +++ b/src/php/lib/Grpc/BaseStub.php @@ -68,6 +68,13 @@ class BaseStub { } /** + * @return string The URI of the endpoint. + */ + public function getTarget() { + return $this->channel->getTarget(); + } + + /** * Close the communication channel associated with this stub */ public function close() { |