diff options
author | michael-grunder <michael.grunder@gmail.com> | 2013-03-27 21:21:18 +0400 |
---|---|---|
committer | michael-grunder <michael.grunder@gmail.com> | 2013-03-27 21:21:18 +0400 |
commit | ef792320e7a5acbb7361ab4dfcb9624c115b7e39 (patch) | |
tree | 481464ba1e55555ecde7f616b60526f184fba102 /php_redis.h | |
parent | b2ffb7ac753f5fa94d808dbf684a64e9f0e6f8c5 (diff) |
Introspection methods
This commit adds methods to get information about the state
of our phpredis object, such as what host/port we are connected
to, our timeout, etc...
The following methods have been added:
getHost()
getPort()
getDBNum()
getTimeout()
getReadTimeout()
isConnected()
getPersistentID()
getAuth()
In addition, there is a small memory leak fix when a persistent id
was specifically passed to connect() (it wasn't beeing freed).
Addresses issue #320
Diffstat (limited to 'php_redis.h')
-rw-r--r-- | php_redis.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/php_redis.h b/php_redis.h index 24f00215..6ed4babe 100644 --- a/php_redis.h +++ b/php_redis.h @@ -181,6 +181,15 @@ PHP_METHOD(Redis, setOption); PHP_METHOD(Redis, config); +PHP_METHOD(Redis, getHost); +PHP_METHOD(Redis, getPort); +PHP_METHOD(Redis, getDBNum); +PHP_METHOD(Redis, getTimeout); +PHP_METHOD(Redis, getReadTimeout); +PHP_METHOD(Redis, isConnected); +PHP_METHOD(Redis, getPersistentID); +PHP_METHOD(Redis, getAuth); + #ifdef PHP_WIN32 #define PHP_REDIS_API __declspec(dllexport) #else |