diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-04-09 10:24:13 +0200 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-04-09 10:24:13 +0200 |
commit | 882e5243767bd4cc143aceaae4133f92a762c6af (patch) | |
tree | 9d395f7c1f12752982bbade94f898cec8a794bc7 /include/call.h | |
parent | 3953d8833e070fa1d6cc7b264dd19ed56c909f02 (diff) |
added unset function (request from issue #71)
Diffstat (limited to 'include/call.h')
-rw-r--r-- | include/call.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/call.h b/include/call.h index 6c5dd8f..1fb1462 100644 --- a/include/call.h +++ b/include/call.h @@ -50,6 +50,7 @@ inline Value array_key_exists(const char *key, const Value &array) { return arra inline Value array_key_exists(const std::string &key, const Value &array) { return array.contains(key); } inline Value array_keys(const Value &value) { return call("array_keys", value); } inline Value array_values(const Value &value) { return call("array_values", value); } +inline Value count(const Value &value) { return call("count", value); } inline Value echo(const char *input) { out << input; return nullptr; } inline Value echo(const std::string &input) { out << input; return nullptr; } inline Value empty(const Value &value) { return value.isNull() || !value.boolValue(); } @@ -57,9 +58,10 @@ inline Value empty(const HashMember<std::string> &member) { return !member.exist inline Value empty(const HashMember<int> &member) { return !member.exists() || empty(member.value()); } inline Value ini_get(const Value &value) { return call("ini_get", value); } inline Value is_array(const Value &value) { return value.isArray(); } -inline void unset(HashMember<std::string> &member) { member.unset(); } -inline void unset(HashMember<int> &member) { member.unset(); } -inline void unset(HashMember<Value> &member) { member.unset(); } +inline Value strlen(const Value &value) { return call("strlen", value); } +inline void unset(const HashMember<std::string> &member) { member.unset(); } +inline void unset(const HashMember<int> &member) { member.unset(); } +inline void unset(const HashMember<Value> &member) { member.unset(); } /** * The isset function conflicts with the 'isset' macro defined by the Zend engine |