diff options
Diffstat (limited to 'php/src/ice/communicator.cpp')
-rw-r--r-- | php/src/ice/communicator.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/php/src/ice/communicator.cpp b/php/src/ice/communicator.cpp index c01265364d4..df9f1346ba9 100644 --- a/php/src/ice/communicator.cpp +++ b/php/src/ice/communicator.cpp @@ -57,6 +57,7 @@ static function_entry _methods[] = {"addObjectFactory", PHP_FN(Ice_Communicator_addObjectFactory), NULL}, {"removeObjectFactory", PHP_FN(Ice_Communicator_removeObjectFactory), NULL}, {"findObjectFactory", PHP_FN(Ice_Communicator_findObjectFactory), NULL}, + {"flushBatchRequests", PHP_FN(Ice_Communicator_flushBatchRequests), NULL}, {NULL, NULL, NULL} }; @@ -348,6 +349,31 @@ ZEND_FUNCTION(Ice_Communicator_findObjectFactory) phpFactory->findObjectFactory(id, return_value TSRMLS_CC); } +ZEND_FUNCTION(Ice_Communicator_flushBatchRequests) +{ + if(ZEND_NUM_ARGS() != 0) + { + WRONG_PARAM_COUNT; + } + + ice_object* obj = getObject(getThis() TSRMLS_CC); + if(!obj) + { + RETURN_NULL(); + } + assert(obj->ptr); + Ice::CommunicatorPtr* _this = static_cast<Ice::CommunicatorPtr*>(obj->ptr); + + try + { + (*_this)->flushBatchRequests();; + } + catch(const IceUtil::Exception& ex) + { + throwException(ex TSRMLS_CC); + } +} + #ifdef WIN32 extern "C" #endif |