diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2013-09-12 05:46:02 -0700 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2013-09-12 05:46:02 -0700 |
commit | 9634a336f080bc15c1e67495eb9216d1863808f8 (patch) | |
tree | 139d3abc65f156d5e72e02364481fea370c807dc /include/environment.h | |
parent | 68fd128d82819db1022137a45ca3224cee8ef029 (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.h | 17 |
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: /** |