summaryrefslogtreecommitdiff
path: root/include/super.h
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-04-03 12:47:09 +0200
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-04-03 12:47:09 +0200
commitc9d8cabfebc9a3b757fa1492c4431b0f88e9ded0 (patch)
treec76764dcd4ae2737b2de23a8a2d0d575613cd71e /include/super.h
parenta5aaa0877fa586499c4be8f19df760fff11f28dd (diff)
{auto} fixed super-globals when running as apache module, and when using just-in-time setting for the super-globals (fixes issue #63)
Diffstat (limited to 'include/super.h')
-rw-r--r--include/super.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/include/super.h b/include/super.h
index 73e3761..97ba6b8 100644
--- a/include/super.h
+++ b/include/super.h
@@ -25,9 +25,10 @@ public:
* Extension writers do not have to access the super-globals themselves.
* They are always accessible via Php::POST, Php::GET, et cetera.
*
- * @param index number
+ * @param index index number
+ * @param name name of the variable in PHP
*/
- Super(int index) : _index(index) {}
+ Super(int index, const char *name) : _index(index), _name(name) {}
/**
* Destructor
@@ -40,7 +41,7 @@ public:
* @param key
* @return Value
*/
- Value operator[](const std::string &key) const;
+ Value operator[](const std::string &key);
/**
* Array access operator
@@ -48,7 +49,7 @@ public:
* @param key
* @return Value
*/
- Value operator[](const char *key) const;
+ Value operator[](const char *key);
private:
/**
@@ -56,6 +57,12 @@ private:
* @var int
*/
int _index;
+
+ /**
+ * Name of the variable in PHP
+ * @var name
+ */
+ const char *_name;
};
/**