summaryrefslogtreecommitdiff
path: root/include/call.h
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-04-14 09:21:35 +0200
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-04-14 09:21:35 +0200
commit6b5506dfe7b0f5ac9ce923c1d9cdd2ebc4c72a7c (patch)
tree4b8e29c6cdb8347569a89e2758edb6518ff6f962 /include/call.h
parent792497f731c5c3a93a442bd487bd7ae4e0ffb2bf (diff)
added Php::IniValue constructor to the Php::Value class, so that "return Php::ini_get("extension.x");" can be implemented
Diffstat (limited to 'include/call.h')
-rw-r--r--include/call.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/include/call.h b/include/call.h
index f881782..16de1fe 100644
--- a/include/call.h
+++ b/include/call.h
@@ -57,16 +57,6 @@ inline Value echo(const std::string &input) { out << input; return nullptr; }
inline Value empty(const Value &value) { return value.isNull() || !value.boolValue(); }
inline Value empty(const HashMember<std::string> &member) { return !member.exists() || empty(member.value()); }
inline Value empty(const HashMember<int> &member) { return !member.exists() || empty(member.value()); }
-
-inline IniValue ini_get(const char* name)
-{
- return IniValue(name, false);
-}
-inline IniValue ini_get_orig(const char* name)
-{
- return IniValue(name, true);
-}
-
inline Value is_array(const Value &value) { return value.isArray(); }
inline Value strlen(const Value &value) { return call("strlen", value); }
inline void unset(const HashMember<std::string> &member) { member.unset(); }
@@ -74,6 +64,14 @@ inline void unset(const HashMember<int> &member) { member.unset(); }
inline void unset(const HashMember<Value> &member) { member.unset(); }
/**
+ * The 'ini_get' function returns an IniValue, so that it can also be used
+ * before the PHP engine is started.
+ */
+inline IniValue ini_get(const char* name) { return IniValue(name, false); }
+inline IniValue ini_get_orig(const char* name) { return IniValue(name, true); }
+
+
+/**
* The isset function conflicts with the 'isset' macro defined by the Zend engine
*/
#pragma push_macro("isset")