diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2015-01-25 19:52:06 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2015-01-25 19:52:06 +0100 |
commit | 110f379c083a9e061d2337efabb86f12ce0fa750 (patch) | |
tree | 3c5e541532607246feeecd8d9dea3f36f803071f /include/call.h | |
parent | b42532f1f49d9f404b100fe1a441de0c131673ee (diff) |
added functions Php::constant() to retrieve the value of a constant, and Php::defined() to find out if a constant is defined
Diffstat (limited to 'include/call.h')
-rw-r--r-- | include/call.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/call.h b/include/call.h index 279cbac..950cc3e 100644 --- a/include/call.h +++ b/include/call.h @@ -18,6 +18,12 @@ namespace Php { extern bool class_exists(const char *classname, size_t size, bool autoload = true); inline bool class_exists(const char *classname, bool autoload = true) { return class_exists(classname, strlen(classname), autoload); } inline bool class_exists(const std::string &classname, bool autoload = true) { return class_exists(classname.c_str(), classname.size(), autoload); } +extern Value constant(const char *constant); +extern Value constant(const char *constant, size_t size); +extern Value constant(const std::string &constant); +extern bool defined(const char *constant); +extern bool defined(const char *constant, size_t size); +extern bool defined(const std::string &constant); extern Value eval(const std::string &phpCode); extern Value include(const std::string &filename); extern Value include_once(const std::string &filename); |