diff options
Diffstat (limited to 'php/src/php7/Communicator.cpp')
-rw-r--r-- | php/src/php7/Communicator.cpp | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/php/src/php7/Communicator.cpp b/php/src/php7/Communicator.cpp index 4dd3018eae2..dbaf53d4e64 100644 --- a/php/src/php7/Communicator.cpp +++ b/php/src/php7/Communicator.cpp @@ -271,6 +271,52 @@ ZEND_METHOD(Ice_Communicator, __construct) runtimeError("communicators cannot be instantiated directly"); } +ZEND_METHOD(Ice_Communicator, shutdown) +{ + CommunicatorInfoIPtr _this = Wrapper<CommunicatorInfoIPtr>::value(getThis() TSRMLS_CC); + assert(_this); + + try + { + _this->getCommunicator()->shutdown(); + } + catch(const IceUtil::Exception& ex) + { + throwException(ex TSRMLS_CC); + } +} + +ZEND_METHOD(Ice_Communicator, isShutdown) +{ + CommunicatorInfoIPtr _this = Wrapper<CommunicatorInfoIPtr>::value(getThis() TSRMLS_CC); + assert(_this); + + try + { + RETURN_BOOL(_this->getCommunicator()->isShutdown() ? 1 : 0); + } + catch(const IceUtil::Exception& ex) + { + throwException(ex TSRMLS_CC); + RETURN_FALSE; + } +} + +ZEND_METHOD(Ice_Communicator, waitForShutdown) +{ + CommunicatorInfoIPtr _this = Wrapper<CommunicatorInfoIPtr>::value(getThis() TSRMLS_CC); + assert(_this); + + try + { + _this->getCommunicator()->waitForShutdown(); + } + catch(const IceUtil::Exception& ex) + { + throwException(ex TSRMLS_CC); + } +} + ZEND_METHOD(Ice_Communicator, destroy) { CommunicatorInfoIPtr _this = Wrapper<CommunicatorInfoIPtr>::value(getThis()); @@ -1470,6 +1516,9 @@ static zend_function_entry _interfaceMethods[] = static zend_function_entry _classMethods[] = { ZEND_ME(Ice_Communicator, __construct, ICE_NULLPTR, ZEND_ACC_PRIVATE|ZEND_ACC_CTOR) + ZEND_ME(Ice_Communicator, shutdown, ICE_NULLPTR, ZEND_ACC_PUBLIC) + ZEND_ME(Ice_Communicator, isShutdown, ICE_NULLPTR, ZEND_ACC_PUBLIC) + ZEND_ME(Ice_Communicator, waitForShutdown, ICE_NULLPTR, ZEND_ACC_PUBLIC) ZEND_ME(Ice_Communicator, destroy, ICE_NULLPTR, ZEND_ACC_PUBLIC) ZEND_ME(Ice_Communicator, stringToProxy, ICE_NULLPTR, ZEND_ACC_PUBLIC) ZEND_ME(Ice_Communicator, proxyToString, ICE_NULLPTR, ZEND_ACC_PUBLIC) |