summaryrefslogtreecommitdiff
path: root/php/src/IcePHP/Profile.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2008-01-31 15:58:05 -0800
committerMark Spruiell <mes@zeroc.com>2008-01-31 15:58:05 -0800
commitfa41f0057235e0b7434d224f3f794166d24ccd23 (patch)
treea47724b73b79a821e37adaf36c87f0fdfca074a6 /php/src/IcePHP/Profile.cpp
parentbug 2335 - updating docu for db.jar (diff)
downloadice-fa41f0057235e0b7434d224f3f794166d24ccd23.tar.bz2
ice-fa41f0057235e0b7434d224f3f794166d24ccd23.tar.xz
ice-fa41f0057235e0b7434d224f3f794166d24ccd23.zip
bug 2421 - add method to get Ice version in scripting languages
Diffstat (limited to 'php/src/IcePHP/Profile.cpp')
-rw-r--r--php/src/IcePHP/Profile.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/php/src/IcePHP/Profile.cpp b/php/src/IcePHP/Profile.cpp
index 9aaa83166fa..b4eb307193c 100644
--- a/php/src/IcePHP/Profile.cpp
+++ b/php/src/IcePHP/Profile.cpp
@@ -831,6 +831,17 @@ do_load(const string& name, const Ice::StringSeq& args TSRMLS_DC)
return true;
}
+ZEND_FUNCTION(Ice_version)
+{
+ if(ZEND_NUM_ARGS() != 0)
+ {
+ WRONG_PARAM_COUNT;
+ }
+
+ string s = ICE_STRING_VERSION;
+ RETURN_STRINGL(const_cast<char*>(s.c_str()), s.length(), 1);
+}
+
ZEND_FUNCTION(Ice_loadProfile)
{
if(ZEND_NUM_ARGS() > 1)