summaryrefslogtreecommitdiff
path: root/include/environment.h
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-09-12 05:46:02 -0700
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-09-12 05:46:02 -0700
commit9634a336f080bc15c1e67495eb9216d1863808f8 (patch)
tree139d3abc65f156d5e72e02364481fea370c807dc /include/environment.h
parent68fd128d82819db1022137a45ca3224cee8ef029 (diff)
It now is possible to access global variables, using environment[varname], and to set global variable using environment[varname] = "value"
Diffstat (limited to 'include/environment.h')
-rw-r--r--include/environment.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/environment.h b/include/environment.h
index b8b4f74..6484d83 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -23,6 +23,7 @@ namespace Php {
* Forward definitions
*/
class Extension;
+class Global;
/**
* Class definition
@@ -91,6 +92,22 @@ public:
{
_data = data;
}
+
+ /**
+ * Get access to a global variable
+ * @param name
+ * @return Global
+ */
+ Global operator[](const char *name);
+
+ /**
+ * Get access to a global variable
+ * @param name
+ * @return Global
+ */
+ Global operator[](const std::string &name);
+
+
protected:
/**