diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-04-04 08:36:43 +0200 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-04-04 08:36:43 +0200 |
commit | 2eb4e891d9b2d3c71a2b1d7367d85b22f4ecc9cf (patch) | |
tree | 76f75279a28306f2d1a84c0068f8e47df22d33f3 | |
parent | 6e2556ab445169cadb21d9ba16eb77d7350a79f7 (diff) |
fixed typos in documentation, added ini_get() function to call.h
-rw-r--r-- | documentation/variables.html | 6 | ||||
-rw-r--r-- | include/call.h | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/documentation/variables.html b/documentation/variables.html index d577699..719d95e 100644 --- a/documentation/variables.html +++ b/documentation/variables.html @@ -274,7 +274,7 @@ Php::Value filled({ "a", "b", "c", "d"}); // you can cast an array to a vector, template parameter can be // any type that a Value object is compatible with (string, int, etc) -std::vector<std::string> fruit = array; +std::vector<std::string> fruit = array; // create an associative array Php::Value assoc; @@ -297,7 +297,7 @@ assoc2["z"][1] = "b"; assoc2["z"][2] = "c"; // assoc arrays can be cast to a map, indexed by string -std::map<std::string,std::string> map = assoc2; +std::map<std::string,std::string> map = assoc2; </code></pre> </p> @@ -381,7 +381,7 @@ Php::out << value.call("format", "Y-m-d H:i:s") << std::endl; void myFunction(const Php::Value &value) { // assum the value variable holds an array or object, it then - // is possible to iterator over the values or properties + // is possible to iterate over the values or properties for (auto &iter : value) { // output key and value diff --git a/include/call.h b/include/call.h index 0ef6353..3ad4776 100644 --- a/include/call.h +++ b/include/call.h @@ -51,6 +51,7 @@ inline Value echo(const std::string &input) { out << input; retu 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 Value ini_get(const Value &value) { return call("ini_get", value); } //inline Value isset(const Value &value) { return call("isset", value); } //inline Value isset(const HashMember<std::string> &member) { return member.exists() && isset(member.value()); } //inline Value isset(const HashMember<int> &member) { return member.exists() && isset(member.value()); } |